I have a pointer that points to a class. How do I get class members through the pointer?
example:
Problem is, I can't have TCPointer.Num - I can only have TCPointer. As I write this, I found I way I don't need to do it anymore, but is this possible to do?Code:class TestClass
{
public:
int Num;
};
void main()
{
TestClass TC;
TC.Num = 5;
TestClass *TCPointer;
TCPointer = TC;
cout << TCPointer.Num;
}