PDA

View Full Version : help plz....


SanDRocK
February 14th, 2003, 06:34
sup,
maybe someone can help me.....
I'm kinda new to programing, and am currently learning C/C++


k here's my problem....
everytime i try building anything....anything at all....
even if its just a simple little hello world dos window like

#include <iostream.h>

int main()
{
cout<<"Hello WORLD!!!!";
return 0;
}


i keep getting an error in the debug window saying the following....

Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/test.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

test.exe - 2 error(s), 0 warning(s)

everything was working fine yesterday, but it just started doing that today here for some reason......like i sayed i'm a newb when it comes to C/C++
i kinda get what the error means but i have no idea why it does it lol

Teamz
February 14th, 2003, 07:08
you probably have created a Window application instead of a Console application when you started your project

SanDRocK
February 14th, 2003, 07:26
nope console app

fox-
February 18th, 2003, 07:58
SanDRock:

looks like you left iostream.h out of your #include?

you've got:

#include

int main()
{
cout<<"Hello WORLD!!!!";
return 0;
}

should be:

#include "iostream.h"

int main()
{
cout << "hello world";
return(0);
}

other than the half done preprocessor command everything looks fine to me. you may have to replace the "'s with a < > or drop them altogether depending on your compiler.

fox-

SnakeBite
February 18th, 2003, 11:48
this thread covers all my knowledge for c++... :lol: