CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 24

Threaded View

  1. #1
    Join Date
    Jul 2007
    Posts
    249

    Arrow Constructor Inheritance

    How we conclude that the constructors are not inherited??

    Because I can call the base class constructors like below which means that the the constructor is accissible .

    Code:
    class Base{
    public:
    Base(int x,int y){}
    };
    class Derived : public Base{
    
    public:
    Derived(int a,int b):Base(a,b) //I am calling the Base constructor
    {
    }
    };
    Thanks
    Last edited by Rajesh1978; May 4th, 2010 at 08:39 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured