In search of code that uses every feature of C++
I'm looking for a simple program whose sole purpose is to include every feature of C++. I just want to be able to scroll through and make sure I understand everything I see, and am not missing anything. See what I mean?
Is there a name for programs like this? I guess I'm interested in a program of this nature in all languages, but primarily C++.
Re: In search of code that uses every feature of C++
Hi Guy,
You can try the code below. For a start and then other members they shall help you. Becareful the code is looping using ( while ) loop.
regards,
curiaquita
#include <iostream>
int main(int argc, char *argv[])
{
int i=0;
while(i++ < 10)
{
std::cout << i << std::endl;
}
std::cin.get();
}
Re: In search of code that uses every feature of C++
I think you're missing a few features there.
I doubt the code you seek exists.
Re: In search of code that uses every feature of C++
are u looking for a scripting control u could google those one is created by microsoft which supports nearly most of language syntaxes like basic/java (like C/C++)/pascal
Re: In search of code that uses every feature of C++
Quote:
I'm looking for a simple program whose sole purpose is to include every feature of C++
Sounds like a story I once heard about a manager asking a junior developer to print out the internet so he could "read it on the train".
I'm afraid there is no application which exercises every C++ feature and API in the world.
C++ (and all related APIs) is like space. It's big. It's very big. It's verging on infinite.
If you want a reference book which describes pretty much everything in the language then buy "The C++ Programming Language" by Stroustrup.
Darwen.
Re: In search of code that uses every feature of C++
Quote:
Originally Posted by darwen
Sounds like a story I once heard about a manager asking a junior developer to print out the internet so he could "read it on the train".
Interesting...
Re: In search of code that uses every feature of C++
Quote:
Originally Posted by dumparun
Interesting...
Of course it would have to be on the train...because...
On an airplane...It would be too big for carry on.... :D :D :D
To use every feature of C++ would take something on the order of 30 million lines of code. [this is based on some CDREL test validation programs for compilers....]
Re: In search of code that uses every feature of C++
Quote:
Originally Posted by bicpen
I'm looking for a simple program whose sole purpose is to include every feature of C++. I just want to be able to scroll through and make sure I understand everything I see, and am not missing anything. See what I mean?
Is there a name for programs like this? I guess I'm interested in a program of this nature in all languages, but primarily C++.
Here you go.
MFC. That guys even invented things because they where out of tihings that exists.
Cheers, this made my day :D
Re: In search of code that uses every feature of C++
Quote:
Originally Posted by Odiee
Here you go.
MFC. That guys even invented things because they where out of tihings that exists.
Cheers, this made my day :D
Actually MFC for all of its large size uses only a very very tiny fraction of C++ (from a comprehensive capabilities mix). This is primarily due to the fact that when MFC was written most "C++" compileres, really weren't (they were just beefed up "C" compilers which simulated many of the C++ language features.
Re: In search of code that uses every feature of C++
Quote:
Originally Posted by TheCPUWizard
Actually MFC for all of its large size uses only a very very tiny fraction of C++ (from a comprehensive capabilities mix). This is primarily due to the fact that when MFC was written most "C++" compileres, really weren't (they were just beefed up "C" compilers which simulated many of the C++ language features.
Oh? I didn't know that, thanks.
Re: In search of code that uses every feature of C++
Quote:
Originally Posted by Odiee
Oh? I didn't know that, thanks.
Look how long MFC has been around. Then realize that VC++ 7.0 is the first (Visual C++) compiler that even comes close to being standard.
Should not be a suprise to ANYONE.....
Re: In search of code that uses every feature of C++
I'm was being nice, because I learned interesting fact, and now you are rude because I didn't know something?
Re: In search of code that uses every feature of C++
Quote:
Originally Posted by Odiee
I'm was being nice, because I learned interesting fact, and now you are rude because I didn't know something?
Not indending to be rude (if it came across that way I apologize).
You have been here on the forums for a while (over 400 posts), so I thought you would have seen the many threads which specifically cover the reasons why VC++ 6.0 (and earlier) is such a bad choice for learning C++ (significant non-compliance with the standard).
MFC has been around since at least VC++ 3.0 (and I believe earlier...). There have also been many posts concerning the "quality" of MFC. [Not re-starting THAT debate...]. It is popular because there is such a large existing codebase, but it does not conform to modern C++ design paradigms.
At the very least, it was written before STL was a part of the language (which it has been for over a decade). This gives rise to the duplication of many items (e.g. containers) at the conceptual level, which have vast differences at the usage level.
Re: In search of code that uses every feature of C++
It's alright, you didn't offend me.
It's just that I dont work with MFC that long (about 3 years) and didn't really studied the issues on difference between 6.0 and .NET.
Before that I worked with pretty comfortable BCB, and wasn't prepared for harsh reality of VisualStudio :)