MS Visual Studio 2013

i am a new programmer and i've installed ms visual studio 2013 express now. i try to run a simply program and it gives me errors! for example

//code

include <iostream>
using namespace std;

int main()
{
cout << "Hello";

}


//code


and i get multiple errors. i am really confused and have an assignment due tomorrow. Please help guys :(


Error 3 error C2065: 'cout' : undeclared identifier c:\users\azam anees\documents\visual studio 2013\projects\project1\project1\demo.cpp 6 1 Project1


Error 1 error C2143: syntax error : missing ';' before '<' c:\users\azam anees\documents\visual studio 2013\projects\project1\project1\demo.cpp 1 1 Project1


Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\azam anees\documents\visual studio 2013\projects\project1\project1\demo.cpp 1 1 Project1



7 IntelliSense: identifier "cout" is undefined c:\Users\Azam Anees\Documents\Visual Studio 2013\Projects\Project1\Project1\demo.cpp 6 2 Project1

Try uninstalling and reinstalling your compiler.

As Xion18 said below, you simply forgot the hash symbol before your include statement. I assumed this was a copy paste error.
Last edited on
You forgot # before include and when you run it the screen will show up a bit and then disappear to stop this. My advice is to use system('pause'); and return 0; after your cout << "Hello";. Don't use system('pause') later on its not really great but it just a start for you.
Xion18 wrote:
to stop this. My advice is to use system('pause'); and return 0; after your cout << "Hello";. Don't use system('pause') later on its not really great but it just a start for you.
If you know it's not good to use why are you recommending it? Just link to this post:
http://www.cplusplus.com/forum/beginner/1988/
L B, youre right that was just a copy paste error but thank you guys the pause thing worked!
Topic archived. No new replies allowed.