Whats wrong with my code?

Whats wrong with my code?

#include <iostream>
using namespace std;

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

I keep on getting two errors:

"there were build errors. Would you like to continue and run the last succesful build?"

And

"Unable to start program. The system cannot find the filed specified."

I've already installed visual studio express twice. But it just keeps on giving me the same errors.
You might want to do a clean then rebuild.
closed account (z05DSL3A)
My guess is that you created a project, deleted the code given by the project template and replaced it with the above. If the is a correct assumption it is likely that you have removed the include file used for pre-compiled headers. The easiest way to check this is to put #include <stdafx.h> on the the top line of your code and rebuild.

If this does not work, instead of saying yes to the "there were build errors... " dialog, say no and go back to VS, click on the error list tab at the bottom and report back here what the errors are.
Your code as perfect. Try compile in other compiler, for example: g++ or mingW.
Thanks Grey Wolf :)
Topic archived. No new replies allowed.