Click here to Skip to main content
15,915,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create a Service Pin
Member 13661819-Dec-02 4:48
Member 13661819-Dec-02 4:48 
Generalself-upgrading program Pin
thisisnotfake18-Dec-02 10:53
thisisnotfake18-Dec-02 10:53 
GeneralTransparent the staticbox ?! Pin
Hadi Rezaee18-Dec-02 10:34
Hadi Rezaee18-Dec-02 10:34 
GeneralInheritance. Pin
WREY18-Dec-02 10:16
WREY18-Dec-02 10:16 
GeneralRe: Inheritance. Pin
Ravi Bhavnani18-Dec-02 10:23
professionalRavi Bhavnani18-Dec-02 10:23 
GeneralRe: Inheritance. Pin
WREY18-Dec-02 11:03
WREY18-Dec-02 11:03 
GeneralRe: Inheritance. Pin
Ravi Bhavnani18-Dec-02 11:23
professionalRavi Bhavnani18-Dec-02 11:23 
GeneralRe: Inheritance. Pin
WREY19-Dec-02 6:34
WREY19-Dec-02 6:34 
Thanks Ravi.

Because I am defining the function 'Msg()' inside the class definition, I don't need to qualify it with the class name and the scope resolution operator. Therefore, the definition of 'Msg()' is correct.

There is also another function named, 'Msg()' defined in the base class 'Store' (which I did not show), which is why I chose to use the 'reinterpret_cast' cast operator to access that specific 'Msg()' function in 'Store'. But that's NOT where the problem is happening. That line gets executed fine, and everything gets done that is supposed to get done in that line. Everything is OK with that line!!!

The problem is with the next line following it, where I'm accessing a protected data member of the base class. That's where the problem is occurring.

Now, according to the rules of C++, a publicly derived class is allowed to access protected data members of its base class, but the compiler is not agreeing, and that's the line where the disagreement is pointing to.

Cool | :cool:

William
GeneralRe: Inheritance. Pin
Alvaro Mendez18-Dec-02 10:33
Alvaro Mendez18-Dec-02 10:33 
GeneralRe: Inheritance. Pin
WREY18-Dec-02 10:56
WREY18-Dec-02 10:56 
GeneralRe: Inheritance. Pin
Alvaro Mendez18-Dec-02 12:41
Alvaro Mendez18-Dec-02 12:41 
GeneralRe: Inheritance. Pin
WREY19-Dec-02 7:18
WREY19-Dec-02 7:18 
GeneralRe: Inheritance. Pin
Alvaro Mendez20-Dec-02 6:05
Alvaro Mendez20-Dec-02 6:05 
GeneralRe: Inheritance. Pin
WREY20-Dec-02 7:18
WREY20-Dec-02 7:18 
GeneralRe: Inheritance. Pin
Chris Richardson19-Dec-02 18:59
Chris Richardson19-Dec-02 18:59 
GeneralRe: Inheritance. Pin
WREY19-Dec-02 21:49
WREY19-Dec-02 21:49 
GeneralRe: Inheritance. Pin
Chris Richardson20-Dec-02 7:03
Chris Richardson20-Dec-02 7:03 
GeneralRe: Inheritance. Pin
WREY20-Dec-02 7:24
WREY20-Dec-02 7:24 
QuestionHow to delete an HBITMAP? Pin
Joan M18-Dec-02 9:37
professionalJoan M18-Dec-02 9:37 
AnswerRe: How to delete an HBITMAP? Pin
Christian Graus18-Dec-02 9:49
protectorChristian Graus18-Dec-02 9:49 
GeneralRe: How to delete an HBITMAP? Pin
Joan M18-Dec-02 9:59
professionalJoan M18-Dec-02 9:59 
AnswerRe: How to delete an HBITMAP? Pin
Paul M Watt18-Dec-02 9:51
mentorPaul M Watt18-Dec-02 9:51 
GeneralRe: How to delete an HBITMAP? Pin
Joan M18-Dec-02 9:59
professionalJoan M18-Dec-02 9:59 
GeneralWeird Case Pin
Sidney18-Dec-02 9:34
Sidney18-Dec-02 9:34 
GeneralRe: Weird Case Pin
Chris Richardson18-Dec-02 10:31
Chris Richardson18-Dec-02 10:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.