私はこのようなクラスAとクラスBを持っています:
class A
{
public:
   A(){}
};
class B : public A
{
public:
   B() : A()
   {
      value = 10;
   }
   int Value()
   {
      return value;
   }
protected:
   int value;
}:
私はこのコードを持っています:
int main()
{
   A* a = new B();
   // how can I access to Value() ? I would like to make that :
   int val = a->Value();
   // must i cast a to B ? how ?
}
ご協力いただきありがとうございます。