I just started programming yesterday, and i ran into a problem i get this error message everytime i try and build.
fatal error: iostream: No such file or directory
Heres the code, straight from the book
using namespace std;
mynumber = 10;
cout << mynumber << endl;
If you don't know what a file extension is, or what it means to compile your program then I suggest you re-read the first several chapters in your book. These are such basic things that you should already know?
You need to rename this file so it ends with a .cpp file so your compiler recognizes it as a C++ program, not a C program.
The other option would be to create a new C++ project make sure you select a console application, and select a C++ program, and then type in a new title for your project. Make sure your project directory is in the correct place (Not under the Program Files directory), select next make sure both the check boxes are selected, and press finish.
You should then have a new project with a simple C++ source file you can compile to make sure your compiler is properly setup.