Hi i m trying to write huge code buts it getting error,
"/opt/studio11/SUNWspro/prod/include/CCios/iostream.h", line 1387: Error: The name streambuf is ambiguous, streambuf and std::streambuf.
Can anyone explain me whats the reason to get this error and probable solution?????
The compiler has come across the name streambuf and has found more than one definition for it, streambuf and std::streambuf.
This could be due to including a header that should not be included or careless use of something like usingnamespace std;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#include<iostream>
int test; // test 1
namespace GW
{
int test; // test 2
}
usingnamespace GW;
int main()
{
test = 0; // error C2872: 'test' : ambiguous symbol
::test = 0; // use test 1
GW::test = 0; // use test 2
}