Alf P. Steinbach wrote:
* Prasad: [quoting signature etc.]
Please don't quote signatures.
* Prasad:
A minimal program that reproduces the problem is
the one I have described above itself..
#include <STRING>
using namespace std;
#include <hash_map>
If i try to compile these 2 lines also , I am getting the same problem
....
It compiles fine with Visual C++ 7.1, even with the uppercase "STRING"
(which should be lowercase).
I suggest you upgrade or downgrade your compiler, whichever version it is.
As a temporary solution it might work to just remove the "using
namespace std;" directive, or move it after all #include's.
hi,
Thanx for ur reply..
I moved using namespace std after all #include's.
those errors have been removed...
But , now I am getting a new list of errors...
c:\program files\microsoft visual studio\vc98\include\utility(27) :
error C2953: 'pair' : template class has already been defined
c:\program files\microsoft visual
studio\vc98\include\utility(27) : see declaration of 'pair'
c:\program files\microsoft visual studio\vc98\include\utility(31) :
error C2995: '==' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_pair.h(53) : see declaration of '=='
c:\program files\microsoft visual studio\vc98\include\utility(40) :
error C2995: '<' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_pair.h(59) : see declaration of '<'
c:\program files\microsoft visual studio\vc98\include\utility(55) :
error C2995: 'make_pair' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_pair.h(90) : see declaration of 'make_pair'
c:\program files\microsoft visual studio\vc98\include\utility(57) :
error C2011: 'input_iterator_tag' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\utility(58) :
error C2011: 'output_iterator_tag' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\utility(60) :
error C2011: 'forward_iterator_tag' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\utility(62) :
error C2011: 'bidirectional_iterator_tag' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\utility(64) :
error C2011: 'random_access_iterator_tag' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\utility(71) :
error C2982: 'iterator' : new template parameter list has less
parameters than the previous declaration
c:\program files\microsoft visual
studio\vc98\include\utility(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\utility(71) :
error C2953: 'iterator' : template class has already been defined
c:\program files\microsoft visual
studio\vc98\include\utility(71) : see declaration of 'iterator'
c:\program files\microsoft visual studio\vc98\include\utility(174) :
error C2983: 'reverse_iterator' : new template parameter list has more
parameters than the previous declaration
c:\program files\microsoft visual
studio\vc98\include\utility(174) : see declaration of
'reverse_iterator'
c:\program files\microsoft visual studio\vc98\include\utility(174) :
error C2953: 'reverse_iterator' : template class has already been
defined
c:\program files\microsoft visual
studio\vc98\include\utility(174) : see declaration of
'reverse_iterator'
c:\program files\microsoft visual studio\vc98\include\utility(180) :
error C2995: '==' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_iterator.h(498) : see declaration of '=='
c:\program files\microsoft visual studio\vc98\include\utility(192) :
error C2995: '<' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_iterator.h(509) : see declaration of '<'
c:\program files\microsoft visual studio\vc98\include\utility(291) :
error C2504: 'iterator<struct std::output_iterator_tag,void,void>' :
base class undefined
c:\program files\microsoft visual
studio\vc98\include\utility(318) : see reference to class template
instantiation 'std::ostreambuf_iterator<_E,_Tr>' being compiled
c:\program files\microsoft visual studio\vc98\include\xmemory(34) :
error C2995: '_Construct' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_construct.h(47) : see declaration of
'_Construct'
c:\program files\microsoft visual studio\vc98\include\xmemory(38) :
error C2995: '_Destroy' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_construct.h(57) : see declaration of
'_Destroy'
c:\program files\microsoft visual studio\vc98\include\xutility(20) :
error C2995: 'copy' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_algobase.h(267) : see declaration of 'copy'
c:\program files\microsoft visual studio\vc98\include\xutility(26) :
error C2995: 'copy_backward' : template function has already been
defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_algobase.h(390) : see declaration of
'copy_backward'
c:\program files\microsoft visual studio\vc98\include\xutility(30) :
error C2995: 'equal' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_algobase.h(534) : see declaration of
'equal'
c:\program files\microsoft visual studio\vc98\include\xutility(34) :
error C2995: 'equal' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_algobase.h(549) : see declaration of
'equal'
c:\program files\microsoft visual studio\vc98\include\xutility(39) :
error C2995: 'fill' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_algobase.h(442) : see declaration of 'fill'
c:\program files\microsoft visual studio\vc98\include\xutility(54) :
error C2995: 'lexicographical_compare' : template function has already
been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_algobase.h(564) : see declaration of
'lexicographical_compare'
c:\program files\microsoft visual studio\vc98\include\xutility(64) :
error C2995: 'lexicographical_compare' : template function has already
been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_algobase.h(583) : see declaration of
'lexicographical_compare'
c:\program files\microsoft visual studio\vc98\include\xutility(90) :
error C2995: 'mismatch' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_algobase.h(503) : see declaration of
'mismatch'
c:\program files\microsoft visual studio\vc98\include\xutility(96) :
error C2995: 'mismatch' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_algobase.h(520) : see declaration of
'mismatch'
c:\program files\microsoft visual studio\vc98\include\xutility(101) :
error C2995: 'swap' : template function has already been defined
c:\program files\microsoft visual
studio\vc98\include\stl\stl_algobase.h(90) : see declaration of 'swap'
Error executing cl.exe.
ChatServer.obj - 28 error(s), 0 warning(s)
I am not able understand all these..
Please help me out...