Papers/programming
The usage of a static class function by an object
tomato13
2008. 3. 12. 10:41
class CTC12
{
public:
CTC12() {
OutputDebugString("Construnctor\n");
}
~CTC12() {};
static int m_SetValue(int nVal){
m_nVal = nVal;
return 1;
}
static int m_GetVale()
{
return m_nVal;
}
private:
static int m_nVal;
};
int CTC12::m_nVal;
void TC12()
{
CTC12* pTC12 = new CTC12();
pTC12->m_SetValue(10);
delete pTC12;
}