Can someone with a repeater problem help me? I'm getting something like this: SomeClass {public: creator creates a new t_Records // destroyer m_RefPtr deletes or decreases m_RefCnt // copy creator gives new obj to m_RefPtr m_RefPtr provides //, increases m_RefCnt bool search (const string & amp;;); Private: // some private variable structure t_Records {// int m_RefCnt for reference calculation; // References Counter Typingf Vector & lt; Int & gt; M_Vec; Typedef Map & lt; String, m_Vec & gt; M_Map; m_Map m_RecMap; T_Records (zero) {m_RefCnt = 1; }}; T_Records * m_RefPtr; }; // Finds m_RefPtr's map, TRUE gives bool SomeClass :: search (constants string & keyword) {// How to create and use an iterator of m_Map ??? Back true; } How do I mention, as I am having problems with creating struct (outside map) struct outside the map itater. The map is initalized and has some records in it. Thanks for your reply
like this:.
// think m_RefPtr starts properly: t_Records :: m_Map :: iterator = m_RefPtr-> m_RecMap.begin (); This ++; // e.t.c. By the way, m_map is a bad name for one type. From the general convention, the prefix names with the m_ are used for data members.
Comments
Post a Comment