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;
}
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"?
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!
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.