I can't seem to get iostream.h to use itself as an include file. I get the error saying that the file or directory doesn't exist. I use Bloodshed Dev-C++. Does anyone have the same problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
iostream is not in the include directory, it is in the include/g++3 directory. If you compile a c program then the compiler only looks in the include directory and when you compile a c++ program it also looks in g++3.
You have to indicate that you want it to be compiled as c++. You can rename you file blabla.c to blabla.cpp or you can select c++ in the project options.
note1: you should #include<iostream> without the .h, this is the current standard.
note2: to see which include directories are used for c and c++ you can look at Tools->Compiler Options-> directories.
stephan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can't seem to get iostream.h to use itself as an include file. I get the error saying that the file or directory doesn't exist. I use Bloodshed Dev-C++. Does anyone have the same problem?
iostream is not in the include directory, it is in the include/g++3 directory. If you compile a c program then the compiler only looks in the include directory and when you compile a c++ program it also looks in g++3.
You have to indicate that you want it to be compiled as c++. You can rename you file blabla.c to blabla.cpp or you can select c++ in the project options.
note1: you should #include<iostream> without the .h, this is the current standard.
note2: to see which include directories are used for c and c++ you can look at Tools->Compiler Options-> directories.
stephan