Thursday, January 12, 2012

C

When creating functions in C you need to declare all your variables before any other function is called

void foo(){
doSomething();
var int; // BAD
}

void foo(){
var int; //GOOD
doSomething();
}

If you want to compile via command line in Windows, find the bin folder of your visual studio via command line

C:\Program Files\Microsoft Visual Studio 8\VC\bin

execute the vcvars32.bat

Now go to the folder where your program is and use CL (compile and link) followed by any files you want to make your exe

CL queue.c queueTest.c

No comments:

Post a Comment