469,623 Members | 1,850 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

#include <iostream.h>

when i use #include <iostream.h> in some files
i get lots of error messages of the kind 'ambiguous symbol
this is solved when i use #include <iostream
why is that ? and can i use #include <iostream.h> in some way

examples to the error messages

c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streamb.h(90): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streamb.h(90): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(258): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(258): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(258): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\istream.h(64): error C2872: 'ios' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streamb.h(90): error C2872: 'ios' : ambiguous symbo
could be 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(106) : ios
or 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iosfwd(462) : std::ios
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\istream.h(139): error C2872: 'istream' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\istream.h(149): error C2872: 'istream' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(272): error C2872: 'ostream' : ambiguous symbo
could be 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(104) : ostream
or 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iosfwd(465) : std::ostream
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(159): error C2872: 'ostream' : ambiguous symbo
could be 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(104) : ostream
or 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iosfwd(465) : std::ostream
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(160): error C2872: 'ostream' : ambiguous symbo
could be 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(104) : ostream
or 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iosfwd(465) : std::ostream
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(219): error C2872: 'ostream' : ambiguous symbo
could be 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(104) : ostream
or 'c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\iosfwd(465) : std::ostream
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(146): error C2872: 'streambuf' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streamb.h(158): error C2872: 'streambuf' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\streamb.h(159): error C2872: 'streambuf' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\ios.h(290): error C2872: 'streambuf' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\istream.h(67): error C2872: 'streambuf' : ambiguous symbo
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\istream.h(90): error C2872: 'streambuf' : ambiguous symbo
Nov 17 '05 #1
1 4333
ya man wrote:
when i use #include <iostream.h> in some files ,
i get lots of error messages of the kind 'ambiguous symbol'
this is solved when i use #include <iostream>
why is that ? and can i use #include <iostream.h> in some way ?


You're trying to mix <iostream> and <iostream.h> in a single translation
unit?

Short answer: don't. Just get rid of <iostream.h>, since it's not supported
in VC7.1 (or later) anyway.

-cd
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by John Tiger | last post: by
11 posts views Thread by Charles L | last post: by
3 posts views Thread by ajay2552 | last post: by
3 posts views Thread by abdulmahmud | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.