By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,491 Members | 3,132 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,491 IT Pros & Developers. It's quick & easy.

#include <iostream.h>

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.