|
-
June 26th, 2002, 01:47 PM
#1
How to initialize static map?
How can I initialize a static map type member without an instance?
For example:
class MyClass{
...
const static CMap<int,int,int,int> m_map;
}
const CMap<int,int,int,int> MyClass::m_map;
MyClass::m_map.SetAt(1,1); << Error
MyClass::m_map.SetAt(2,2); << Error
I need a static map (dictionary) in the class which is accessible by static function.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|