views:

69

answers:

3

To be more precise, when I used eclipse for java, every time I typed it would check for errors. For example, if I typed a line and forgot a semi-colon, eclipse underlined the area in red and gave me an error, same with misspellings, variable names that have not been defined, etc, etc, etc.

I'm now using Visual Studio 2008 (as the teacher requires it for C++) and I was wondering if there is a way to have it do the same as eclipse does? This feature is really handy and cuts my coding time in nearly a third as I don't have to backtrack near as much.

Thanks in advance for the heads up!

PS: Sorry if it's not called "auto-compile", was the only descriptive term I could think of that made a remote amount of sense!

+1  A: 

Visual Assist X has such a feature. Unfortunately it's not cheap, and doesn't work with Express editions...

Kornel Kisielewicz
Correct, the express editions don't allow plug-in usage.
Jon
I have the full version of VS2008, so no problem with that...but yes, that software is really expensive...and puts it way over an amount to make it justifiable. Sure it's what I want...but I don't want it $250 worth.
Jeff
+1  A: 

No, there is not support for full background compilation, but it will try to check your syntax for you, although it's not great at it. Visual Studio 2010 does a better job at catching errors before compile time, but it's not exactly something to rely on. C++ is a much, much more complex language than Java...

Travis Gockel
Yea, I got that from when I used it, Java felt a lot more...well...simple, than C++ had when comparing the beginner courses with each other...granted I still prefer C++ over java. Didn't think that was the reason for lack of auto compiling though?
Jeff
If you ever want an example of why compilation in C++ is so hard, just take a look at the Boost.Preprocessor libraries ( http://www.boost.org/doc/libs/1_41_0/libs/preprocessor/doc/index.html ), which allow you to create compiler-generated dynamic craziness. Another good example is Boost.Spirit, which is a preprocessor and type system which lets you create a domain-specific language *inside of your C++ source* which is *compiled along with your C++ source.* Great libraries and wonderful examples of why you don't try to compile C++ on the fly.
Travis Gockel
A: 

You can use the ReSharper plug-in to do it (and ReSharper offers a -lot- of other functionality also). It would be great functionality to have out-of-the-box though.

http://www.jetbrains.com/resharper/index.html

Jon
The OP is using C++ not C#
ChrisF
Ah I see, ReShaper supports C# and VB.NET but not C++.
Jon