Beginner Error C1083 Help please

I i'm starting to learn to program but I have already encountered a error when i try to run or debug my code. This is the error message
"c:\users\(name)\documents\dd\game_over\game_over\game_over.cpp(4): fatal error C1083: Cannot open include file: 'iostream': No such file or directory"
I followed a book which has worked before but not this time. Anyone help??
This is the code.
1
2
3
4
5
6
7
8
9
10
  //Game Over
//A first C++ program

#include <iostream>

int main()
{
	std::cout << "Game Over" << std::endl;
		return 0;
}
This code compiles for me OK. What compiler and version are you using?
Im just using Visual C++ 2010 Express..
closed account (jvqpDjzh)
Maybe with VC++ the iostream is called in another way. I have used visual studio just a little, but shouldn't there be a header file called "stdafx.h"?
Last edited on
Strange. I just copied and pasted your code here and it compiles. Maybe try cutting and pasting from this link and see if that works for you?

http://ideone.com/LKFZUg
I've used Visual Studio 2010 and always used <iostream> without having to include stdafx.h.
No of your ideas are working. Still the same error.
closed account (jvqpDjzh)
Try read this: http://msdn.microsoft.com/en-us/library/et4zwx34.aspx
or this: http://social.msdn.microsoft.com/Forums/en-US/7843071f-0767-4af4-b645-508e3ffcf56f/visual-c-fatal-error-c1083-cannot-open-include-file?forum=Vsexpressvc
or use code::blocks, which is very good!
Okay will try thanks alot.
It looks as though Visual Studio is not configured correctly. As to the reason why, I don't know. If all else fails, you might re-install it, though there might be a much simpler answer.
Topic archived. No new replies allowed.