display | more...
Microsoft Visual C++, the standard program with which to write applications for Windows, along with Microsoft Visual Basic. While there are other good products available (compilers from Borland and Metrowerks, for example.) MSVC has the advantage probably because it's from Microsoft for an OS by Microsoft (I wonder why the Department of Justice wants to break up Microsoft?)

You want to program for Windows and would like to know what to get? I suggest VC++ over Visual Basic because C++ is a much more powerful language. Basic is an easier language though.

Maybe someone with more experience with some of the other compilers and development environments could compare them to the Microsoft Products to help beginners pick something.

A great FAQ on this subject can be found at http://www.iseran.com/Win32/FAQ/faq.htm#21

Be forewarned that Visual C++ is not fully ANSI compliant (Yes, I know it says that it is on the box. Don't believe everything you read. No, not even this.)

I agree, Quill. MSVC++ is a must for any Windows programmer. Windows itself is mostly written in it.

Another tool I would recommend for Windows programming is a good assembler. I used to start by writing my Windows code in C, compile to assembly language, optimize by hand, then assemble with MASM. VC++ comes in several different packages and price ranges: I have the least expensive one, and it does no optimization.

Generally, I now do my Windows development exclusively in assembly language, without even writing it in C. Assembly language is very easy under Windows since so much of it is just calls to system libraries anyway. But the result is much smaller and runs much faster, which is very important as under Windows your code is always competing with someone else's code running at the same time (well, not literally at the same time, but you know what I mean).

If your code is small, it has a better chance of being kept in the RAM all the time. And, of course, speed is of utmost importance.

By the way, now that I code in 100% assembly language, I prefer using NASM over MASM, mostly because it allows me to reuse the same code under Windows and Unix without modification. But for mixed C/assembly language programming MASM may be better since if you compile from C (or C++ - but I avoid C++ like a plague), the result will be in MASM syntax.

Even when programming in 100% assembly language, I use the VC++ editor. That way I have the complete Windows programming reference at my fingertips.

Somebody above once mentioned MSVC's problem with member templates, which many of us first noticed in version 5. It's a bug, it's a bad bug, it's an insult, and it still hasn't been fixed in version 6. They spent a lot of time on useless GUI frills in the IDE, they added some extra pop-up harrassment boxes in the editor, but they didn't fix the compiler.

I've heard, once or twice, that MSVC is a particularly good choice for a beginner. I don't really buy it. Standard compliance isn't a big issue, though. Beginners aren't writing member templates, for God's sake. The same goes for the other advantages one hears mentioned: Most of it's probably valid, but it's just not a big deal when you're still trying to figure out what a pointer is. First things first. Any functional C++ compiler is fine for a beginner writing command line programs1, and command line programs are what a beginner should be writing, because GUIs just drag a lot more weird issues into things. Lots of people think I'm on crack with this issue, but they're wrong.

However: If you're just hell-bent on writing GUI programs right off, MSVC is an aggressively bad choice. Your only options are: (a) Win32 API programming in C (which is a really, really rotten idea for a beginner, for reasons that don't belong in this writeup), or (b) MFC. Don't go anywhere near MFC until you've learned C++ and object-oriented programming already, because MFC is a lousy example of both. You should learn from good examples when you're starting out. I work with MFC every day. You can learn to live with it, but your own code should be better than that. It's not "visual", for one thing, and far worse, it's not just inelegant in some abstract sense: It is very painful to use in comparison to a well-designed class library. And then they make everything revolve around their halfassed "document/view" thing. MFC is an ideal framework for writing MDI-ish Notepad replacements as example programs. It's not well-suited to anything else.

Speaking of well-designed class libraries: Borland's C++ Builder is my own recommendation for beginners who can't be discouraged from writing GUI code in C++. The class library is very usable and well laid-out. The compiler breaks the standard in some ugly ways that you'll have to unlearn when you move on to other compilers, but that's worth tolerating for the other benefits. If you're not hell-bent on C++, try Delphi: It's C++ Builder but with Pascal instead of C++, which some naïve people find less intimidating at first. Don't ever waste your time or money on Visual Basic. Like any basic dialect, it is useless and toxic. Even Perl is better than basic.

Back to MSVC. MSVC is one of the more standard-compliant C++ compilers now available. None are entirely compliant. Not one (see C++: No compilers available). Maybe in a few years.

The much-advertised "AppWizard" is annoying, buggy crap. It's just this close to being more trouble than it's worth. The rest of the MSVC IDE is mostly quite nice. One flaw is that the extension language is Visual Basic, which is far too ugly and annoying to use (this must have been a corporate decision rammed down the throats of people who knew better: Basic is a not a selling point among most C++ programmers). Other than the stupid VB thing, it's okay: The regular expression implementation is broken, but nowhere near as badly as one would expect from Microsoft. The syntax highlighting is only slightly broken: It forces you to use the same color for character and string literals -- in C, mind you, in a language where these are two totally unrelated data types. char literals should be the same color as ints, dammit. I don't think you can add new syntaxes to it, either, which is lame (the best you can do without writing a COM object is to muck around in the registry and convince it that, say, awk files are really C). I genuinely like the editor, aside from that. The auto-indenting and whatnot can be customized properly, the keyboard commands can be customized, etc. The debugger isn't SoftIce, but that's just as well. I like the MSVC debugger better than Borland's. The IDE is reasonably well-organized and lets you very conveniently keep everything you need in view. For me, this is a big issue, and I haven't seen a Borland IDE that's as pleasing in that respect.

Finally, regardless of its virtues, the MSVC IDE is a gigantic lardy monstrosity that takes forever to start (worse than Delphi/C++ Builder, but still far better than Borland's old "main stream" C++ IDE). I don't use it for ordinary everyday text editing because it's such a pig (EditPlus is groovy for random editing, by the way, and it integrates better with outside tools).

1 My first C++ compiler was the old 16-bit Zortech compiler for DOS, and it was not functional, not even close.

I respectfully think whizkid is out of his mind writing windows code in assembly language, but I support his choice.

Log in or register to write something here or to contact authors.