iostream header 
Author Message
 iostream header

Hi all,

I'm using Microsoft Visual C++ 4.2 to write a program.
I want to use the string class that comes with the standard
template library, so I have a couple of include directives
at the top of the program. The program looks like this:

#include <iostream.h>
#include <string>

int main()
{
        string mystr("This is a string");
        int pos = mystr.find("str");
        cout << pos << endl;
      return 0;

Quote:
}

(OK, it doesn't do anything). The point is that if I include
<iostream.h>, I get a gadzillion errors. If I now change
the include directive to #include <iostream>, it compiles
and runs OK. Does anyone know why?

Thanks,
--

Akin Akinsoto

To reply, don't use the address generated
by your e-mail program's "reply to" command.
Instead, use the following address:
ak.soto at btinternet.com

"Spread the word.
 Let's have one vast ocean of knowledge
 instead of millions of ponds of facts."



Mon, 30 Apr 2001 03:00:00 GMT  
 iostream header
iostream.h is part of Microsoft's legacy stream library.  <iostream> is
part of the C++ Standard Library.


Quote:

>Hi all,

>I'm using Microsoft Visual C++ 4.2 to write a program.
>I want to use the string class that comes with the standard
>template library, so I have a couple of include directives
>at the top of the program. The program looks like this:

>#include <iostream.h>
>#include <string>

>int main()
>{
>        string mystr("This is a string");
>        int pos = mystr.find("str");
>        cout << pos << endl;
>      return 0;
>}

>(OK, it doesn't do anything). The point is that if I include
><iostream.h>, I get a gadzillion errors. If I now change
>the include directive to #include <iostream>, it compiles
>and runs OK. Does anyone know why?

>Thanks,

--------------------------------------------------------------------------------

Principal Software Engineer       Corporate Web Page:     http://www.xiotech.com

Eden Prairie, MN                  Personal Home Page:   http://www.visi.com/~nde

"Question authority...and the authorities will end up questioning YOU!"
--------------------------------------------------------------------------------



Mon, 30 Apr 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. iostream header files in unmanaged C++ AP

2. PLEASE HELP-STANDARD C++ iostream header usage

3. Standard C++ iostream header

4. iostream header

5. iostream header and compile errors ...

6. header files: iostream, fstream,string

7. new headers and <iostream>

8. Fw: <iostream>, <iostream.h>, Visual C++, g++

9. <iostream>, <iostream.h>, Visual C++, g++

10. mixing iostream.h and std::iostream etc...

11. Iostream vs Iostream.h

12. Migration from old iostream to Standard iostream

 

 
Powered by phpBB® Forum Software