Then, I add a file to the Source Files called HelloWorld.cpp. This is my code I type:
#include <iostream>
main()
{
std::cout << "Hello World!" << std::endl;
}
Then I try to build, compile, anything, but I keep getting this error saying:
c:\documents and settings\nick davidson\desktop\experiments\vbprojects\helloworld \helloworld\helloworld\helloworld.cpp(4) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
I even added "return 0;" to that code but no luck, someone help me.

C++ Build Failure
Mark Stutzbach
Edit: it works through command prompt ok, but I want it to work by clicking or debugging too...
tjokiest
You can just step into your code using the debugger (F10) or you can just add system("Pause"); at the end of your main to prevent the window from closing quickly under the IDE.
Hope this helps!
Thanks, Ayman Shoukry VC++ Teampire
try -
#include <iostream>
void main()
{
std::cout << "Hello World!" << std::endl;
}
Frank Jona
You could use void main as someone suggested, but make sure you read this :-
http://msdn.microsoft.com/library/default.asp url=/library/en-us/vccelng/htm/basic_21.asp
brendon.smith
I compile alot from command line or build file:
cl hw.cpp /EHs|more
Try this code, and see if it gets you started . . .
// The hw.cpp program
#include <iostream>
using namespace std;
int main()
{
char wait;
cout << "Perfunctory \"Hello World\" message" << endl;
cin >> wait; // type a letter and hit 'Enter'
}