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

Threaded View

  1. #8
    Join Date
    Apr 2009
    Posts
    30

    Re: Does this call create a list automatically?

    As far as I know, due to the private inheritance relationship mentioned in the previous post, all public members of the base class CListManager become private members of class CGGen. However, CGGen cannot access the list named "items" defined in ListManager.h because this list is defined as private in the base class CListManager.

    So, could you please let me know why in GGen.h, the GetNumOfStep(void) const function uses:

    return CListManager<CStep>::GetNumOfItems()

    instead of

    return GetNumOfItems()

    I though the public member function GetNumOfItems() became a private member function of CGGen already.

    Q1: Is it because in order to access the private member "items" defined in ListManager.h,
    it has to be done this way?

    Q2: In this case, the inherited member function GetNumOfItem() in GGen.h is not used.
    Am I right?
    Last edited by hajimeml; July 3rd, 2009 at 07:13 PM.

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