int main()
{
cout << "Hello World!\n";
return 0;
}
It gives me aleast two errors, and when i try to fix the errors, i end up getting more errors. I'm pretty sure its because of my Enviroment Options but i dont know how to get to it and change it. I'm using both Microsoft Visual C++ 2008 Express Edition and Bloodshed Dev-C++.
moving to the C++ section for actual help. i'll give you a 1 hour redirect.
Post your errors, we can't just magically retrieve them.
I see a error right away, you just got cout instead of std::cout, that ought to render a error. If you want to be lazy and only write cout, you need to add: using namespace std; (preferably before your main).
Code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!\n"; << endl;
return 0;
}
That should work.
Originally Posted by Calebb
Code:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!\n"; << endl;
return 0;
}
That should work.
nice u helped him so i thanked you. for helping him. yes. using namespace std; and #include "stdafx.h" are very basic. that can explain ur first two errors.