Click here to Skip to main content
15,888,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Numerical processing in C/C++ - text(books) resources? OT Pin
Richard MacCutchan5-Oct-13 20:46
mveRichard MacCutchan5-Oct-13 20:46 
AnswerRe: Numerical processing in C/C++ - text(books) resources? OT Pin
CPallini2-Oct-13 0:50
mveCPallini2-Oct-13 0:50 
AnswerRe: Numerical processing in C/C++ - text(books) resources? OT Pin
Albert Holguin8-Oct-13 5:47
professionalAlbert Holguin8-Oct-13 5:47 
GeneralRe: Numerical processing in C/C++ - text(books) resources? OT Pin
Vaclav_8-Oct-13 6:18
Vaclav_8-Oct-13 6:18 
GeneralRe: Numerical processing in C/C++ - text(books) resources? OT Pin
Albert Holguin8-Oct-13 7:21
professionalAlbert Holguin8-Oct-13 7:21 
QuestionAccess specifier in multiple inheritance Pin
TheHelenLee30-Sep-13 10:24
TheHelenLee30-Sep-13 10:24 
AnswerRe: Access specifier in multiple inheritance Pin
.dan.g.30-Sep-13 18:51
professional.dan.g.30-Sep-13 18:51 
AnswerRe: Access specifier in multiple inheritance Pin
«_Superman_»30-Sep-13 19:05
professional«_Superman_»30-Sep-13 19:05 
You cannot really change the access type in a derived class.
Consider the situation where Derived derives from Base in your example - class Derived : public Base

In this case, if you create an object of Base, then Identity() would be public.
And if you create an object of Derived, then Identity() would be protected.
This is probably what you want, but this behavior is only because when the Base object is created, the compiler sees Identity() as public and when the Derived object is created the compiler see Identity() as protected.

But if you do this - Base* ptr = new Derived;
And access Identity() like this - ptr->Identity();
You will be able to do this, since Identity() is still public and not changed to protected.

So even though, you're creating an object of Derived, the compiler only checks the class Base since the pointer is of type Base.
«_Superman 
I love work. It gives me something to do between weekends.


Microsoft MVP (Visual C++) (October 2009 - September 2013)

Polymorphism in C

QuestionRe: Access specifier in multiple inheritance Pin
TheHelenLee30-Sep-13 19:25
TheHelenLee30-Sep-13 19:25 
AnswerRe: Access specifier in multiple inheritance Pin
pasztorpisti30-Sep-13 23:11
pasztorpisti30-Sep-13 23:11 
QuestionAdodc : how to retrieve single value into EditBox Pin
coolerfantasy29-Sep-13 21:02
coolerfantasy29-Sep-13 21:02 
QuestionRe: Adodc : how to retrieve single value into EditBox Pin
David Crow30-Sep-13 3:07
David Crow30-Sep-13 3:07 
AnswerRe: Adodc : how to retrieve single value into EditBox Pin
coolerfantasy30-Sep-13 19:42
coolerfantasy30-Sep-13 19:42 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
Freak301-Oct-13 0:46
Freak301-Oct-13 0:46 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
coolerfantasy1-Oct-13 20:05
coolerfantasy1-Oct-13 20:05 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
Freak302-Oct-13 1:50
Freak302-Oct-13 1:50 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
coolerfantasy2-Oct-13 20:01
coolerfantasy2-Oct-13 20:01 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
David Crow3-Oct-13 5:56
David Crow3-Oct-13 5:56 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
coolerfantasy5-Oct-13 19:46
coolerfantasy5-Oct-13 19:46 
Questionhow to configure googletest for "test code covearge" in visual studio 2010 [modified] Pin
pk jain29-Sep-13 19:35
pk jain29-Sep-13 19:35 
AnswerRe: how to configure googletest for "test code covearge" in visual studio 2010 [modified] Pin
Richard MacCutchan29-Sep-13 20:53
mveRichard MacCutchan29-Sep-13 20:53 
QuestionMonitoring application memory usage Pin
dushkin29-Sep-13 7:33
dushkin29-Sep-13 7:33 
SuggestionRe: Monitoring application memory usage Pin
David Crow29-Sep-13 16:40
David Crow29-Sep-13 16:40 
GeneralRe: Monitoring application memory usage Pin
dushkin29-Sep-13 20:12
dushkin29-Sep-13 20:12 
GeneralRe: Monitoring application memory usage Pin
David Crow30-Sep-13 3:06
David Crow30-Sep-13 3:06 

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.