I am new to C++ and at school I compile with Microsoft Visual 6 and I always use the line
#include<iostream.h>
to use cin and cout
and sometimes the line
#include<iomanip.h>
to use setprecision and setw functions
I get the errors
C:\Dev-Cpp\programs\test.cpp:4
iostream.h: No such file or directory.
and
C:\Dev-Cpp\programs\test.cpp:5
iomanip.h: No such file or directory.
what can i do to use those lines or is there a substitute line I can use or am I a complete idiot that is beyond any help that you can give me.
Thanx in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
iostream.h is deprecated, in a minute I will provide you with a nice link that talks about standard C++ header notation. Visual C++ is old enough to not be very standard.
iostream.h is present, its just in a subdirectory called "backwards" (didn't you do a windows search in the dev directory to find it?)
Now, there have only been about 1000 posts dealing with this issue in the last month and a half, but because you asked the question so nicely, I will point out that you made find it useful to make certain...additions to you C++ includes path - go to tolls:compiler:directories:c++ includes and add, in this order:
where c:\<dev path> is where you let dev install, in my case it would be
c:\dev-cpp
Now, one last note. It is always useful to include in a question such as this what version (exactly, like 4.9.7.0, not newest) and what version of gcc (the compiler) went with it. (You had a choice when you installed, 2.95 or 3.2).
Note the current release is 4.9.7.6
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am new to C++ and at school I compile with Microsoft Visual 6 and I always use the line
#include<iostream.h>
to use cin and cout
and sometimes the line
#include<iomanip.h>
to use setprecision and setw functions
I get the errors
C:\Dev-Cpp\programs\test.cpp:4
iostream.h: No such file or directory.
and
C:\Dev-Cpp\programs\test.cpp:5
iomanip.h: No such file or directory.
what can i do to use those lines or is there a substitute line I can use or am I a complete idiot that is beyond any help that you can give me.
Thanx in advance.
iostream.h is deprecated, in a minute I will provide you with a nice link that talks about standard C++ header notation. Visual C++ is old enough to not be very standard.
iostream.h is present, its just in a subdirectory called "backwards" (didn't you do a windows search in the dev directory to find it?)
Now, there have only been about 1000 posts dealing with this issue in the last month and a half, but because you asked the question so nicely, I will point out that you made find it useful to make certain...additions to you C++ includes path - go to tolls:compiler:directories:c++ includes and add, in this order:
C:\<dev path>\include
C:\<dev path>\include\cpp
C:\<dev path>\include\c++
C:\<dev path>\include\c++\backward
C:\<dev path>\include\c++\bits
C:\<dev path>\include\c++\mingw32\bits
C:\<dev path>\include\c++\ext
C:\<dev path>\include\c++\mingw32
where c:\<dev path> is where you let dev install, in my case it would be
c:\dev-cpp
Now, one last note. It is always useful to include in a question such as this what version (exactly, like 4.9.7.0, not newest) and what version of gcc (the compiler) went with it. (You had a choice when you installed, 2.95 or 3.2).
Note the current release is 4.9.7.6
Wayne
Here is the link I promised you...
http://www.cplusplus.com/doc/ansi/hfiles.html
Wayne