0

I am getting errors for the below code.

@interface event : NSObject
{
NSMutableDictionary  m_cAppIdMap;  //error:statically allocated instance of Objective C
}
@end

I am setting the object to the dictionary through the function create in the event implementation.

[m_cAppIdMap setObject:pEvent forKey:[NSNumber numberWithUnsignedInt:wTimerId]]; //Error:Cannot convert to a pointer type

This is the way i am setting a structure object on to the dictionary. pEvent is the structure containing 5 fields and wTimerId is the unsigned short integer(key).

spandana
  • 755
  • 1
  • 13
  • 29

1 Answers1

4

Your ivar should be a pointer.

NSMutableDictionary*  m_cAppIdMap;
Nyx0uf
  • 4,609
  • 1
  • 25
  • 26