|
-
October 25th, 2008, 04:19 PM
#1
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++.
Last edited by bicpen; October 25th, 2008 at 04:23 PM.
-
October 25th, 2008, 06:13 PM
#2
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();
}
-
October 25th, 2008, 06:53 PM
#3
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.
-
October 25th, 2008, 06:58 PM
#4
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
-
October 26th, 2008, 06:02 AM
#5
Re: 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++
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.
-
October 26th, 2008, 06:05 PM
#6
Re: In search of code that uses every feature of C++
 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...
-
October 26th, 2008, 06:26 PM
#7
Re: In search of code that uses every feature of C++
 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....
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....]
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
October 27th, 2008, 03:15 AM
#8
Re: In search of code that uses every feature of C++
 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
Last edited by Odiee; October 27th, 2008 at 03:18 AM.
You just divided by zero, didn't you?
-
October 27th, 2008, 07:36 AM
#9
Re: In search of code that uses every feature of C++
 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 
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.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
October 27th, 2008, 08:20 AM
#10
Re: In search of code that uses every feature of C++
 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.
You just divided by zero, didn't you?
-
October 27th, 2008, 08:25 AM
#11
Re: In search of code that uses every feature of C++
 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.....
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
October 27th, 2008, 08:33 AM
#12
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?
You just divided by zero, didn't you?
-
October 27th, 2008, 08:51 AM
#13
Re: In search of code that uses every feature of C++
 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.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
October 27th, 2008, 09:55 AM
#14
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
You just divided by zero, didn't you?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|