- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's another one that has me stumped
line 243 of ImagePsn.cpp says
POSITION pos = m_locList.Find( key ) ;
where CImagePosnInfoData key
and CList m_locList ;
but rather than invoking the CList's find function, it generates the following error
1>C:\\Program Files\\Microsoft Visual Studio 8\\VC\\atlmfc\\include\\afxtempl.h(161): error: no operator "==" matches these operands
1> operand types are: const CImagePosnInfoData == const CImagePosnInfoData
1> return *pElement1 == *pElement2;
1> ^
1> detected during:
1> instantiation of "BOOL={int} __stdcall CompareElements(const TYPE *, const ARG_TYPE *) [with TYPE=CImagePosnInfoData, ARG_TYPE=CImagePosnInfoData]" at line 1170
1> instantiation of "POSITION CList::Find(ARG_TYPE, POSITION) const [with TYPE=CImagePosnInfoData, ARG_TYPE=CImagePosnInfoData &]" at line 243 of "ImagePsn.cpp"
1>
So whats up? and what is the workaround?
Again this code has worked on other compilers
Thankx again
Jim
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jim,
Thanks for your issue reporting.
I do see the error among so many other errors because the code is not selfcontained. I'll investigate more and see if I can find a work-around for you.Will get back to you later.
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Any progress on this?
I really do need a solution
Thankx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is a coding issue - you need to add the operator==.
CL also reports error too. CL didn't show the error with your original test is because other errors that stopped the compilation.
Using a simpler testcase attached, it shows the error for both icl and cl.
***** I'm having trouble to post code sample, please see the attachment t.cpp *****
You just need to overload "operator==".

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page