PDA

View Full Version : compiling main first...



hubris
05-31-2009, 04:13 PM
I tend to compile my main first before I've ever even defined any functions so I've always got a page to return to if I get lost. Anyone else do that? Or do some start laying out function definitions and variables first, and filling up main later?

ಠ_ಠ
05-31-2009, 04:23 PM
I use main to coordinate my functions so there is really no point for me to compile it by itself

hubris
05-31-2009, 04:38 PM
Hmmm. I guess it also depends on the project. If my program has some initial cin/cout conversation I do main. If it's just to process a file or calculate complex math without any cin I start with functions and build main later.

MK27
05-31-2009, 04:55 PM
C++ is just silly.

VirtualAce
05-31-2009, 05:03 PM
C++ is just silly.

I fail to see what, if any, value that adds to this thread.


Main is usually the shortest function and is usually not altered in the code I work in so compiling it first really gains nothing. One practice I have gotten into is if I'm making a lot of changes in certain files in the solution I do tend to attempt to get them compiling by themselves first before attempting to rebuild the entire solution. I find it makes the errors a bit more manageable. Again I'm using MSVS 2003 which does not separate out the errors and warnings. 2005 and 2008 do separate them which makes the entire process a bit easier.