C++ Classes Questions and Answers

Recent IT Questions

1 - 2 of 2
<<PREVIOUS 1 NEXT>>

Enum vs. Const

What is the difference between Enum and Const

View Answer   |  Sep 9 2009  8:27 PM GMT
Enumeration, C++, C++ classes
asked by 8862

  5 pts.

How you change a pointer from base class to derived class?

Hello, I have the following classes class Rock { public: Rock() { goldAmount = rand() % 100 + 1; price = 10; }; int revealContent() { return goldAmount; }; virtual void checkPrice() { cout << price << endl; }; protected: int price; private: int goldAmount; }; class...

View Answer   |  Apr 29 2009  11:07 AM GMT
C++, Class, Pointer
asked by CppStudent

  5 pts.

1 - 2 of 2
<<PREVIOUS 1 NEXT>>