|
-
May 5th, 1999, 02:40 AM
#1
Static class member variable, link error, I can't understand
Hi,
I need to access a common value (the number of administrators on the system) by different instance of a class. So I changed an existing protected class member from int m_nAdminCount to static int m_nAdminCount. It compiled OK but with 2 linking errors :
PKI.obj : error LNK2001: unresolved external symbol "protected: static int CPKI::m_nAdminCount" (?m_nAdminCount@CPKI@@1HA)
.\DEBUG/Screener.exe : fatal error LNK1120: 1 unresolved externals
Can someone please tell me what is wrong and how to define a static member variable. Thanks.
Will
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
|