Click here to Skip to main content
15,890,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiondeep/ shallow copy Pin
kumar_mk23-May-06 5:08
kumar_mk23-May-06 5:08 
AnswerRe: deep/ shallow copy Pin
toxcct23-May-06 5:28
toxcct23-May-06 5:28 
GeneralRe: deep/ shallow copy Pin
led mike23-May-06 5:57
led mike23-May-06 5:57 
GeneralRe: deep/ shallow copy Pin
toxcct23-May-06 6:00
toxcct23-May-06 6:00 
GeneralRe: deep/ shallow copy Pin
led mike23-May-06 6:11
led mike23-May-06 6:11 
GeneralRe: deep/ shallow copy Pin
Zac Howland23-May-06 9:22
Zac Howland23-May-06 9:22 
GeneralRe: deep/ shallow copy Pin
led mike23-May-06 20:04
led mike23-May-06 20:04 
Questionproblem with std::map in function find() Pin
baldha rakesh23-May-06 5:04
baldha rakesh23-May-06 5:04 
hi,

i used template class and in this class i used map eith function pointer and string with value and key respective.

with this map i find my function address that i saved previosly and call my function but in this code i have problem with find()..

find return iterator which is map.end() so loop is break ...

in that casse only two function pointer is working but after that it gives end of map..

so pls help to find out this problem..
also i attached my code pls go throught it .


// map of operation methods
typedef bool (CLbxMorphCompareImpl<tbaseclass>::*OperationMethod)(const MorphUtil::CParsedMorph *, const MorphUtil::CParsedMorph *, const std::vector<unicode::ustring> &, long);
typedef std::map<unicode::ustring, operationmethod="" ,="" stdext::equstr=""> OperationMap;
OperationMap m_mapOperations;


template < typename TBaseClass>
CLbxMorphCompareImpl< TBaseClass>::CLbxMorphCompareImpl()
{

unicode::ustring ustr1 = unicode::ustring::create_from_asciiz("agree");

m_mapOperations[ustr1] = &CLbxMorphCompareImpl<tbaseclass>::OperationAgree;


unicode::ustring ustr2 = unicode::ustring::create_from_asciiz("not-agree");

m_mapOperations[ustr2] = &CLbxMorphCompareImpl<tbaseclass>::OperationNotAgree;


unicode::ustring ustr3 = unicode::ustring::create_from_asciiz("strict-agree");

m_mapOperations[ustr3] = &CLbxMorphCompareImpl<tbaseclass>::OperationStrictAgree;


unicode::ustring ustr4 = unicode::ustring::create_from_asciiz("strict-not-agree");

m_mapOperations[ustr4] = &CLbxMorphCompareImpl<tbaseclass>::OperationStrictNotAgree;

}

template<typename tbaseclass="">
long CLbxMorphCompareImpl<tbaseclass>::CompareEx(uint16_t * bstrLeftReference, uint16_t * bstrRightReference, uint16_t * bstrOperation)
{
bool bRet = false;
//TYPENAME must required in template..
typename DataTypeStockImpl::CLbxMorphCompareImpl<tbaseclass>::OperationMap::const_iterator itMethod = m_mapOperations.find(strEachOperation);
}
thanx a lot.
rakesh baldha

Thanks & Regards
rakesh
AnswerRe: problem with std::map in function find() Pin
valikac23-May-06 7:02
valikac23-May-06 7:02 
AnswerRe: problem with std::map in function find() Pin
ThatsAlok23-May-06 18:43
ThatsAlok23-May-06 18:43 
Questionprintf style formatting Pin
bob1697223-May-06 4:36
bob1697223-May-06 4:36 
AnswerRe: printf style formatting Pin
toxcct23-May-06 5:01
toxcct23-May-06 5:01 
GeneralRe: printf style formatting [modified] Pin
bob1697223-May-06 6:33
bob1697223-May-06 6:33 
GeneralRe: printf style formatting Pin
toxcct23-May-06 6:38
toxcct23-May-06 6:38 
GeneralRe: printf style formatting Pin
bob1697223-May-06 7:54
bob1697223-May-06 7:54 
GeneralRe: printf style formatting [modified] Pin
led mike23-May-06 7:06
led mike23-May-06 7:06 
GeneralRe: printf style formatting [modified] Pin
bob1697223-May-06 8:09
bob1697223-May-06 8:09 
GeneralRe: printf style formatting [modified] Pin
John R. Shaw23-May-06 12:34
John R. Shaw23-May-06 12:34 
QuestionHow to read / write Windows NT Extended Attribute Data and Property Data stream Pin
Touseef Afzal23-May-06 4:09
Touseef Afzal23-May-06 4:09 
QuestionMixing C inside MFC programs Pin
blacksalt23-May-06 3:57
blacksalt23-May-06 3:57 
AnswerRe: Mixing C inside MFC programs Pin
Cedric Moonen23-May-06 4:06
Cedric Moonen23-May-06 4:06 
AnswerRe: Mixing C inside MFC programs Pin
John R. Shaw23-May-06 13:11
John R. Shaw23-May-06 13:11 
GeneralRe: Mixing C inside MFC programs Pin
blacksalt24-May-06 3:59
blacksalt24-May-06 3:59 
GeneralRe: Mixing C inside MFC programs Pin
John R. Shaw3-Jun-06 4:41
John R. Shaw3-Jun-06 4:41 
QuestionDeleting a line in a text file Pin
Azghar Hussain23-May-06 3:56
professionalAzghar Hussain23-May-06 3:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.