i have problem to set in to c++ MACRO singletone function result . this is what i have :
the macro
#define CCDICT_FOREACH(__dict__, __el__) \
    CCDictElement* pTmp##__dict__##__el__ = NULL; \
    if (__dict__) \
    HASH_ITER(hh, (__dict__)->m_pElements, __el__, pTmp##__dict__##__el__)
and this is how i try to set it :
CCDictElement* pElement = NULL;
CCDICT_FOREACH(GameSingleTone::getInstance()->getGemsDictionary(), pElement)
{
}
the method getGemsDictionary() returns me:
 CCDictionary*,gemsDictionary;
the compilation error im getting is (on the line of the MACRO):
error C2143: syntax error : missing ';' before '{'
but if i do :
CCDictionary* tempDictionary = CCDictionary::create();
tempDictionary = GameSingleTone::getInstance()->getGemsDictionary();
CCDICT_FOREACH(tempDictionary , pElement)
{
}
every thing is working .
why ?
 
    