Menu

iomanip.h and iosteam.h

2003-02-27
2012-09-26
  • Nobody/Anonymous

    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.

     
    • Nobody/Anonymous

      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:\&lt;dev path>\include
      C:\&lt;dev path>\include\cpp
      C:\&lt;dev path>\include\c++
      C:\&lt;dev path>\include\c++\backward
      C:\&lt;dev path>\include\c++\bits
      C:\&lt;dev path>\include\c++\mingw32\bits
      C:\&lt;dev path>\include\c++\ext
      C:\&lt;dev path>\include\c++\mingw32

      where c:\&lt;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

       
    • Nobody/Anonymous

      Here is the link I promised you...

      http://www.cplusplus.com/doc/ansi/hfiles.html

      Wayne

       

Log in to post a comment.