//////////////////////////////////////////////////////////////////////////////////
void Test()
{
// Whenever the object is created the constructor
// and destructor is called automatically. And it
// can access only the public data of a class.
CBase objBase1;
objBase1.getData();
CBase::GetZStatic(); // No object is required
objBase1.setData(11, 22);
objBase1.getData();
objBase1.GetZStatic(); // Retains the value
objBase1.GetZNonStatic(); // A Non-Static Member Function can access Static
Variable
// vice-versa is not true
cout << "*******************************************" << endl;