Help with hello world

So I'm trying to learn C++ and I've started watching some tutorials and videos about it and I'm copying their code but I copy it but I get errors they don't and I'm not sure how to fix them. It always says "expected ';' before int". So I went to a few different tutorials and they all do the same thing and never run into this issue so now I'm a little lost.

#include <iostream>
using namespace std;

int main()
{
cout<<"Hello World"<<endl;
return 0;
}
Your code is fine. Maybe sth. wrong with your compiler settings. What do you use ?
Using eclipse, I figured it had something to do with the compiler since I know the code is fine, but I have no idea what to look for to look into fixing it.
Just try to rebuild it. Sadly I don't know how in eclipse.
So I tried to rebuild it in eclipse and it didn't work. So I tried it on visual studios and it worked fine after I set it to not using precompiled headers. Still have no idea why eclipse didn't work though.
Topic archived. No new replies allowed.