Ok i just started this morning so please don't laugh at me :P. I am useing Visual Studio 5.0 (97) and the following code thats being a pain is from Lesson 3 of this webpages tutorial:
My problem is i don't know if its me, or something in C++ thats wrong. Thanks in advance!
Compiles Fine:
--------------------Configuration: FirstFor - Win32 Debug--------------------
Compiling...
Skipping... (no relevant changes detected)
source.cpp
source.obj - 0 error(s), 0 warning(s)
Build errors.....:
--------------------Configuration: FirstFor - Win32 Debug--------------------
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/FirstFor.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
FirstFor.exe - 2 error(s), 0 warning(s)
The Code:
#include <iostream.h> //We only need one header file
int main() //We always need this
{ //The loop goes while x<100, and x increases by one every loop
for(int x=0;x<100;x+1) //Keep in mind that the loop condition checks
{ //the conditional statement before it loops again.
//consequently, when x equals 100 the loop breaks
cout<<x<<endl; //Outputting x
}
return 0;
}