Jump to content
  • Advertisement
Sign in to follow this  
Theodore Fuhringer

Which version of C++ should I use?

This topic is 4848 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Apologies if this has been asked before, but I've been trying to sort out the differences between the various versions of C++ out there and it's getting crowded. I currently have the Microsoft Visual C++ 6.0 introductory edition. It has no optimization and you cannot compile or distribute standalone executables. But it's great for learning purposes, IMHO. Part 1 of my question... Should I look into one of the 2003 Visual Studio editions or wait for the upcoming 2005 editions? Part 2 of my question... Can I get Visual C++ separately from Visual Studio and still get all the important features? (ie. MFC, optimization, etc?) Any help sorting out the web of product confusion at the MSDN site would be appreciated, thanks!

Share this post


Link to post
Share on other sites
Advertisement
To begin with, scrapping VC6 would be a good idea, no matter what you end up doing. The compiler is crap, even accepting the lack of optimizations.

Yes, you can get VC without VS. If you are a student, you perhaps shouldn't bother since you can get the entire studio for the same price anyhow. It's a pretty good deal.

In fact, not only can you get VC alone, you can get the VC compiler free off Microsoft's website. Its the whole deal, optimizer and all. I don't know much about this route, but I'm pretty sure you can drop this into VC6 so that you at least get fix that.

You can download a beta of 2005 so you can test it out. It's definately still a beta, but enough to decide if its worth using or not. *edit: Personally, I ended up sticking with 2003, but I don't remember why. It may have just been bugs, I don't know.

And don't discount gcc. There's no comparable IDE [I hear good things about Code::Blocks, but haven't tried it yet...everything else is pretty iffy], but you get better error messages and its template support is a bit better.

CM

Share this post


Link to post
Share on other sites
For now, since VS 2005 should be out this year, I'd go grab a copy of the VS 2003 compiler that Conner mentioned, as well as a copy of the code::blocks IDE. Code::blocks comes packaged by default with a windows version of the GNU C/C++ compiler. It also comes pre-configured to use both Microsoft's free Compiler tools, as well as Borland's.

Microsofts free compiler is very nice. Its equally, if not moreso, in adherence with the C++ standard (All compilers I know of fail in one area or another.) than any other compiler, save possibly the Comeau C++ Compiler. Optimization-wise, its one of the best, with the possible exception of Intel's (rather expensive) compiler - targeting Intel processors, of course.

the C::B / VC++ toolkit combo should at least hold you over until you can see what 2005 has to offer before you spend any money, and who knows, you may like is so much that you decide to stick with it.

Share this post


Link to post
Share on other sites
you can include the vc++2003 toolkit in msvc++6.0 ide

just put the binary and library path infront of the c++6.0 paths and everything works fine

Share this post


Link to post
Share on other sites
Yes MS is ANSI C/C++ compliant unless you are doing anything with Windows(GUI or system calls) and have code using ANSI defines then the compiler will break because none of the header files for Windows are ANSI compliant.

Try it set compiler flag for strict ANSI and you will get thousands of error message in MS own headers.

I VS 7 they use anonymous unions in the window header files which are not allow in ANSI C.

Lord Bart :)

[Edited by - Lord Bart on August 8, 2005 4:01:19 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Lord Bart
Yes MS is ANSI C/C++ compliant unless you are doing anything with Windows(GUI or system calls) and have code using ANSI defines then the compiler will break because none of the header files for Windows are ANSI compliant.


If you are referring to VC++ 6.0 that is not the case don't mix up the C & C++ standards, its has poor standard C++ compliance and poorly implementated C++ standard library due to the fact that VC++ 6.0 came about just as C++ was being standardized that was like 9 years ago. This is why you should not use VC++ 6.0 compiler anymore (i don't mean the IDE either).

@Theodore Fuhringer by the way different C++ compilers doesn't mean different versions of C++, C++ is a standard, a specification (latest being ISO 2003 TC1) that each different compiler implements and conforms to (well tries).

Share this post


Link to post
Share on other sites
Quote:
Original post by Lord Bart
Yes MS is ANSI C/C++ compliant unless you are doing anything with Windows(GUI or system calls) and have code using ANSI defines then the compiler will break because none of the header files for Windows are ANSI compliant.


There are some issues with nonstandard C++ behavior in Visual C++ listed here.

VS2005 has fixed some of it, and appears to be mostly compliant with the C++ standard. If you want to know more, there's a somewhat interesting thread about it over at MSDN

I personally use g++ (gcc), but the Microsoft compilers should be more than capable for your needs.

Share this post


Link to post
Share on other sites
If you ever want to do cross-platform work, go with g++. I personally like hand coding (I know, this is definitely the hard way, but I came from a Lisp background ;-}) and use emacs for code development and g++ for compilation. This doesn't tie me down to one platform. Unix/OSX have g++ built in, and you can download the MinGW g++ compiler for free for your version of MS Windows, which makes native dlls and executables.

There's a steep learning curve however and you have to be prepared to put in a lot of time, initially. Rather than use MSWin dialog windows and other similar api-related features I prefer to interface with web browser interfaces for almost complete generic development. This could be a significant drawback for what you want to do.

If you want to try this, one thing that I've noticed is that you must be very careful about accurately typing on the WinXP/MinGW platform. My Linux and OSX g++ compiled programs appear to be tolerant if a type goes astray, but on my particular hardware, this same programme completely crashes the machine under WinXP. In this case what I discovered was that the culprit was a mistyped 'size_t' and 'unsigned int' on a varable later used within a loop, obviously resulting in a memory allocation error that my hardware under WinXP couldn't cope with, but the Linux and OSX systems ran without complaint. Using a static_cast<>() on that varable resolved the problem. However, mistyping is an error that should be corrected on any platform!

Good Luck!

--random

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!