Archived

This topic is now archived and is closed to further replies.

Help in VC++ 6!

This topic is 5178 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I got Visual C++ 6 installed on my machine and I was really psyked out. I wanted to start to write a program to the pythagorean theorum. First of all though, I wanted to test everything and see if it all worked. So I wrote a little test program which goes as follows: #include "stdio.h" #include "iostream.h" int main() { cout<<"Hello, World!"<

Share this post


Link to post
Share on other sites
#include <iostream>


and the same for stdio but why are you using it?

and it should be cout << "Hello World!";

[edited by - kordova on October 14, 2003 7:09:35 PM]

Share this post


Link to post
Share on other sites
Ok, heres the updated code:

#include <iostream>
#include <stdlib>

int main()
{

cout << "Hello World!";

return 0;
}

I added the stdlib file and found that it narrowed everything down to one error. I also fixed everything else. (I hope)
I still have 1 error left to kill though. Can someone please help me?

Share this post


Link to post
Share on other sites
What the heck?
I''ve tried just about everything there is to try with this damn thing.
Here is what it says inthe error box:

--------------------Configuration: Project_1 - Win32 Debug--------------------
Compiling...
Project_1.cpp
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/Project_1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

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



I don''t understand why it says all of this though. Below is the sourcecode that I used when I got this error:


#include <iostream>

using namespace std;
int main()
{

cout << "Hello World!";

return 0;
}




What the heck is going on? I linked all of my libraries, include files- just about everything. What is going on?

Share this post


Link to post
Share on other sites
I FINALLY got it to work!
Thanks for all of your help and to everyone who gave advice throughout his whole 45 minute ordeal through hell. Now, I can get in to really programming some cool stuff.
-Thanks

Share this post


Link to post
Share on other sites
You got it working but your problem was you were using main() in a win32 application which needs WinMain(). main() is used in console apps. I dont'' think you''re quite ready for win32 so stick to console apps for now eh? good luck dude

Share this post


Link to post
Share on other sites