C++ Path Directory

Posts 1–6 of 6 · Page 1 of 1
C++ Path Directory
I've been learning on how to make hacks with C++, but everytime I type in

#include <iostream>

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.
Quote Originally Posted by Calebb View Post
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.
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us