Hi Everyone
I am new to vc++ 6.0 graphics programming. I am getting some errors of a program which i am trying to compile. i have added all the dependencies but not able to figure out why I am getting the following errors. Any suggestions.

Threading.cpp
C:\Programming\Projects\MX - MSVC6\Threading.cpp(2118) : error C2440: 'initializing' : cannot convert from 'class std::_Tree<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std:[IMG]http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif[/IMG]air<class std::basic_s
tring<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_stri
ng<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > >,struct std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::map<clas
s std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class
c_PerformanceMeasurement> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocato
r<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::_Kfn,struct std::less<class std::basic_st
ring<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::const_iterator' to 'class std::_Tree<class std::basic_string<char,struct std::char_traits<char>,class std
::allocator<char> >,struct std:[IMG]http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif[/IMG]air<class std::basic_st
ring<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_strin
g<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > >,struct std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::map<class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c
_PerformanceMeasurement> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator
<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::_Kfn,struct std::less<class std::basic_str
ing<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class s
td::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::iterator'
No constructor could take the source type, or constructor overload resolution was ambiguous
C:\Programming\Projects\MX - MSVC6\Threading.cpp(2119) : error C2678: binary '!=' : no operator defined which takes a left-hand operand of type 'class std::_Tree<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>,struct std:[IMG]http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif[/IMG]air<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,s
truct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > >,struct std::map<class std::basic_string<char,struct std::char_traits<char>,class std::
allocator<char> >,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<
char> > >,class std::allocator<class c_PerformanceMeasurement> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::
char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::_Kfn
,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_Performan
ceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::iterator' (or there is no acceptable conversion)
C:\Programming\Projects\MX5 - MSVC6\Threading.cpp(2137) : error C2440: 'initializing' : cannot convert from 'class std::_Tree<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std:[IMG]http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif[/IMG]air<class std::basic_s
tring<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_stri
ng<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > >,struct std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::map<clas
s std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class
c_PerformanceMeasurement> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocato
r<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::_Kfn,struct std::less<class std::basic_st
ring<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::const_iterator' to 'class std::_Tree<class std::basic_string<char,struct std::char_traits<char>,class std
::allocator<char> >,struct std:[IMG]http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif[/IMG]air<class std::basic_st
ring<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_strin
g<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > >,struct std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::map<class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c
_PerformanceMeasurement> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator
<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::_Kfn,struct std::less<class std::basic_str
ing<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class s
td::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::iterator'
No constructor could take the source type, or constructor overload resolution was ambiguous
C:\Programming\Projects\MX - MSVC6\Threading.cpp(2138) : error C2678: binary '!=' : no operator defined which takes a left-hand operand of type 'class std::_Tree<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>,struct std:[IMG]http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif[/IMG]air<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,s
truct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > >,struct std::map<class std::basic_string<char,struct std::char_traits<char>,class std::
allocator<char> >,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<
char> > >,class std::allocator<class c_PerformanceMeasurement> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::
char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::_Kfn
,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_Performan
ceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::iterator' (or there is no acceptable conversion)
C:\Programming\Projects\MX - MSVC6\Threading.cpp(2157) : error C2440: 'initializing' : cannot convert from 'class std::_Tree<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std:[IMG]http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif[/IMG]air<class std::basic_s
tring<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_stri
ng<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > >,struct std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::map<clas
s std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class
c_PerformanceMeasurement> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocato
r<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::_Kfn,struct std::less<class std::basic_st
ring<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::const_iterator' to 'class std::_Tree<class std::basic_string<char,struct std::char_traits<char>,class std
::allocator<char> >,struct std:[IMG]http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif[/IMG]air<class std::basic_st
ring<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_strin
g<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > >,struct std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::map<class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c
_PerformanceMeasurement> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator
<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::_Kfn,struct std::less<class std::basic_str
ing<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class s
td::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::iterator'
No constructor could take the source type, or constructor overload resolution was ambiguous
C:\Programming\Projects\MX - MSVC6\Threading.cpp(2158) : error C2678: binary '!=' : no operator defined which takes a left-hand operand of type 'class std::_Tree<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>,struct std:[IMG]http://forums.microsoft.com/MSDN/emoticons/emotion-4.gif[/IMG]air<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,s
truct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > >,struct std::map<class std::basic_string<char,struct std::char_traits<char>,class std::
allocator<char> >,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<
char> > >,class std::allocator<class c_PerformanceMeasurement> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::
char_traits<char>,class std::allocator<char> >,class c_PerformanceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::_Kfn
,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class c_Performan
ceMeasurement,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<class c_PerformanceMeasurement> > > >::iterator' (or there is no acceptable conversion)
C:\Programming\Projects\MX - MSVC6\Threading.cpp(2158) : fatal error C1903: unable to recover from previous error(s); stopping compilation
TimeManager.cpp
Transitions.cpp
Utilities.cpp
Utilities_ATL.cpp
Utilities_FilterGraph.cpp
Error executing cl.exe.
MX.exe - 7 error(s), 0 warning(s)

my guess is that you forgot to include one or more header files. You should post the line(s) the compiler is complaining about.

All the errors are from these codes. I have no clue why? Thanks in advance.

std::map<std::string, std::map<std::string, c_PerformanceMeasurement> >::iterator iClass = mPerformances.find(Class);
if (iClass != mPerformances.end())
 {
  std::map<std::string, c_PerformanceMeasurement>::iterator iPerformance = iClass->second.find(Name);
  if (iPerformance != iClass->second.end())
  {
   return iPerformance->second;
  }
 }

does second.find(Name); return an iterator of the correct type? such as std::map<std::string, c_PerformanceMeasurement>::

All the errors are from these codes. I have no clue why? Thanks in advance.

std::map<std::string, std::map<std::string, c_PerformanceMeasurement> >::iterator iClass = mPerformances.find(Class);
if (iClass != mPerformances.end())
 {
  std::map<std::string, c_PerformanceMeasurement>::iterator iPerformance = iClass->second.find(Name);
  if (iPerformance != iClass->second.end())
  {
   return iPerformance->second;
  }
 }

looks like the variable mPerformances is a const map<...
you have to change ...>::iterator to ...>::const_iterator

does second.find(Name); return an iterator of the correct type? such as std::map<std::string, c_PerformanceMeasurement>::

Yes, it does. Actually, this code is developed by one of the developer of my company. The code runs ok in his machine. But when I try to compile it in my machine, it gives me error. I made sure that all the settings are same as his but same old errors. any suggestions?

. any suggestions?

try vijayan's succestion :)

>>The code runs ok in his machine
And I've heard/said that one a million times too :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.