what does this mean?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sanerqi

    what does this mean?

    class A{
    /*...*/
    };
    class B:A{
    /*....*/
    };


    class B is derived from A? there is not "public","priva te"... before
    A,why?
  • Ian Collins

    #2
    Re: what does this mean?

    sanerqi wrote:
    class A{
    /*...*/
    };
    class B:A{
    /*....*/
    };
    >
    >
    class B is derived from A? there is not "public","priva te"... before
    A,why?
    What does your C++ book tell you about default inheritance?

    --
    Ian Collins.

    Comment

    • Juha Nieminen

      #3
      Re: what does this mean?

      sanerqi wrote:
      class A{
      /*...*/
      };
      class B:A{
      /*....*/
      };
      >
      >
      class B is derived from A? there is not "public","priva te"... before
      A,why?
      Because it's valid to omit it. If nothing is specified, private
      inheritance is assumed.

      Comment

      Working...