944,126 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1471
  • C++ RSS
Apr 13th, 2007
0

VC++ 6.0 errors

Expand Post »
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:http://forums.microsoft.com/MSDN/emo.../emotion-4.gifair<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:http://forums.microsoft.com/MSDN/emo.../emotion-4.gifair<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:http://forums.microsoft.com/MSDN/emo.../emotion-4.gifair<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:http://forums.microsoft.com/MSDN/emo.../emotion-4.gifair<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:http://forums.microsoft.com/MSDN/emo.../emotion-4.gifair<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:http://forums.microsoft.com/MSDN/emo.../emotion-4.gifair<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:http://forums.microsoft.com/MSDN/emo.../emotion-4.gifair<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:http://forums.microsoft.com/MSDN/emo.../emotion-4.gifair<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:http://forums.microsoft.com/MSDN/emo.../emotion-4.gifair<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)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
avi_new is offline Offline
3 posts
since Apr 2007
Apr 13th, 2007
0

Re: VC++ 6.0 errors

my guess is that you forgot to include one or more header files. You should post the line(s) the compiler is complaining about.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,961 posts
since Aug 2005
Apr 13th, 2007
0

Re: VC++ 6.0 errors

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

C++ Syntax (Toggle Plain Text)
  1. std::map<std::string, std::map<std::string, c_PerformanceMeasurement> >::iterator iClass = mPerformances.find(Class);

C++ Syntax (Toggle Plain Text)
  1. if (iClass != mPerformances.end())
  2. {
  3. std::map<std::string, c_PerformanceMeasurement>::iterator iPerformance = iClass->second.find(Name);
  4. if (iPerformance != iClass->second.end())
  5. {
  6. return iPerformance->second;
  7. }
  8. }
Last edited by avi_new; Apr 13th, 2007 at 1:59 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
avi_new is offline Offline
3 posts
since Apr 2007
Apr 13th, 2007
0

Re: VC++ 6.0 errors

does second.find(Name); return an iterator of the correct type? such as std::map<std::string, c_PerformanceMeasurement>::
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,961 posts
since Aug 2005
Apr 13th, 2007
0

Re: VC++ 6.0 errors

Click to Expand / Collapse  Quote originally posted by avi_new ...
All the errors are from these codes. I have no clue why? Thanks in advance.

C++ Syntax (Toggle Plain Text)
  1. std::map<std::string, std::map<std::string, c_PerformanceMeasurement> >::iterator iClass = mPerformances.find(Class);

C++ Syntax (Toggle Plain Text)
  1. if (iClass != mPerformances.end())
  2. {
  3. std::map<std::string, c_PerformanceMeasurement>::iterator iPerformance = iClass->second.find(Name);
  4. if (iPerformance != iClass->second.end())
  5. {
  6. return iPerformance->second;
  7. }
  8. }
looks like the variable mPerformances is a const map<...
you have to change ...>::iterator to ...>::const_iterator
Reputation Points: 1159
Solved Threads: 285
Posting Virtuoso
vijayan121 is offline Offline
1,606 posts
since Dec 2006
Apr 13th, 2007
0

Re: VC++ 6.0 errors

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
avi_new is offline Offline
3 posts
since Apr 2007
Apr 14th, 2007
0

Re: VC++ 6.0 errors

Click to Expand / Collapse  Quote originally posted by avi_new ...
. any suggestions?
try vijayan's succestion

>>The code runs ok in his machine
And I've heard/said that one a million times too
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,961 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Which Compiler?
Next Thread in C++ Forum Timeline: Interest??? Here





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC