Base Class pointer can't operate on a class derived in protected mode?

Discussion in 'C++' started by S.P.I., Sep 1, 2010.

  1. S.P.I.

    S.P.I. New Member

    Joined:
    Sep 1, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi there,

    I apologize for writing a huge title but I figured it would best explain the little predicament I am in here.

    I had been working on a PHP based project the last couple of months and now that I am done I thought I'd refresh my memory by working with C++ lest I forget it forever. Turns out I can't remember quiet a few things...

    I can't figure out why C++ won't let me access an object of a class derived in protected mode using a base class pointer. Could someone shed some light on the issue?


    Thanks.
     
  2. techgeek.in

    techgeek.in New Member

    Joined:
    Dec 20, 2009
    Messages:
    572
    Likes Received:
    19
    Trophy Points:
    0
    Occupation:
    EOC (exploitation of computers)..i m a Terminator.
    Location:
    Not an alien!! for sure
    Home Page:
    http://www.techgeek.in
    Please provide me the code....
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice