Re: error C2872: 'streambuf' : ambiguous symbol Problem
Prasad wrote:
I am a beginner in VC++..
You might then find 'microsoft.public.vc.*' hierarchy of newsgroups
useful as well...
I am trying to write a Win32 console application in visual studio..
I am using following header files..
#include <STRING>
I don't know of a standard header <STRING>. There is <string>, and
since C++ is case-sensitive language, I believe it has to be spelled
as specified. It is possible that you employed some kind of compiler
extensions, of course...
using namespace std;
#include <hash_map>//from Standard template library
//and some other headers
When i complie my code , i am getting the follwing errors ...
c:\program files\microsoft visual studio\vc98\include\istream.h(102) :
'istream.h' looks suspicious. Is it an older, pre-standard header (when
many of them had '.h' after the name)? Is it possible that you're using
<hash_map> from the source that is very old, pre-standard? Well, there
is no *standard* header <hash_map>, but some old sources might be written
to use old pre-standard headers like 'istream.h' (which looks like one).
error C2872: 'streambuf' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(117) :
error C2872: 'streampos' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(118) :
error C2872: 'streamoff' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(119) :
error C2872: 'streampos' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(126) :
error C2872: 'streambuf' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(132) :
error C2872: 'ios' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(139) :
error C2872: 'istream' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(140) :
error C2872: 'istream' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(140) :
error C2872: 'ios' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(140) :
error C2872: 'ios' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(142) :
error C2872: 'istream' : ambiguous symbol
c:\program files\microsoft visual studio\vc98\include\istream.h(143) :
error C2872: 'istream' : ambiguous symbol
-----and so on...
Error executing cl.exe.
ChatServer.obj - 102 error(s), 0 warning(s)
------------------
If i comment any one of those header files, it's compiled with no
errors....
That seems to indicate a conflict of dependencies. Make sure you have
the latest version of <hash_map> (wherever it is you got it from).
But i need those two headers to be included (Becoz, hash_map.h is
being used for hash data structures and string.h using namespace
Note, none of them are actually ".h".
std. is being used in some ou_thread.h which is for threads )..
How can i solve this problem?...
You need to get in touch with makers of <hash_map> and see if they have
anything newer.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask