Guest_imported
New member
- Jan 1, 1970
- 0
i have 2 classes...one is called ClassOne, the other is ClassTwo...ClassTwo has a member variable in it called m_nVariable. I tried to access that member variable from ClassOne by using this code:
void ClassOne::OnButton1()
{
ClassTwo* mem;
CString string;
string.Format ("%d", mem.m_nVariable);
AfxMessageBox (string);
}
this code compiles ok, but it still won't display m_nVariable....I just get a blank message box...wut could the problem be??
void ClassOne::OnButton1()
{
ClassTwo* mem;
CString string;
string.Format ("%d", mem.m_nVariable);
AfxMessageBox (string);
}
this code compiles ok, but it still won't display m_nVariable....I just get a blank message box...wut could the problem be??