Click here to Skip to main content
14,930,722 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralI tried but not working Pin
zahid_ash28-Jan-05 3:02
Memberzahid_ash28-Jan-05 3:02 
GeneralRe: I tried but not working Pin
V.28-Jan-05 3:07
professionalV.28-Jan-05 3:07 
Generalis it for CheckListbox too Pin
zahid_ash28-Jan-05 3:31
Memberzahid_ash28-Jan-05 3:31 
GeneralRe: is it for CheckListbox too Pin
tanvon malik28-Jan-05 3:48
Membertanvon malik28-Jan-05 3:48 
GeneralRe: I tried but not working Pin
tanvon malik28-Jan-05 3:32
Membertanvon malik28-Jan-05 3:32 
GeneralIt works but After Addstring() Pin
zahid_ash30-Jan-05 19:07
Memberzahid_ash30-Jan-05 19:07 
QuestiondWhat is protected inheritance? Pin
phijophlip27-Jan-05 22:53
Memberphijophlip27-Jan-05 22:53 
AnswerRe: dWhat is protected inheritance? Pin
Ryan Binns28-Jan-05 0:49
MemberRyan Binns28-Jan-05 0:49 
phijophlip wrote:
Can you tell me What is protected inheritance?

What didn't you understand about my last answer? (here[^]) It is a way of limiting the visibility of base-class members in the derived class. Protected inheritance means that all the members inherited from the base class have a visibility of at least protected (or private if they're declared private). Private inheritance means that all the members inherited from the base class have a visibility of private.

So basically, protected inheritance means that any public members of the base class will become protected in the derived class, and protected and private members will stay as they were.

phijophlip wrote:
Where are the situations in which protected inheritance is used under what circumstances

I've never had a reason to use it, but you'd use it if the derived class modified the behaviour of the base class in such a way that calling some of the public members of the base class would be harmful to the operation of the derived class, so protected inheritance would make those members public so they couldn't be called from outside the class. IMO, the need to do this indicates a bad OO design, so I would recommend avoiding it.

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

GeneralRe: dWhat is protected inheritance? Pin
trelliot28-Jan-05 2:46
Membertrelliot28-Jan-05 2:46 
AnswerRe: dWhat is protected inheritance? Pin
Selvam R28-Jan-05 1:09
professionalSelvam R28-Jan-05 1:09 
AnswerRe: dWhat is protected inheritance? Pin
trelliot28-Jan-05 2:39
Membertrelliot28-Jan-05 2:39 
GeneralCode for Hibernate and turn of monitor Pin
Rajesh_K_Sharma27-Jan-05 21:39
MemberRajesh_K_Sharma27-Jan-05 21:39 
GeneralRe: Code for Hibernate and turn of monitor Pin
geo_m27-Jan-05 21:49
Membergeo_m27-Jan-05 21:49 
Generalgamma Pin
viliam27-Jan-05 21:39
Memberviliam27-Jan-05 21:39 
GeneralHelp to debug Error!! Pin
Anonymous27-Jan-05 21:13
MemberAnonymous27-Jan-05 21:13 
GeneralRe: Help to debug Error!! Pin
James R. Twine28-Jan-05 2:44
MemberJames R. Twine28-Jan-05 2:44 
GeneralRe: Help to debug Error!! Pin
Anonymous28-Jan-05 13:43
MemberAnonymous28-Jan-05 13:43 
GeneralRe: Help to debug Error!! Pin
James R. Twine28-Jan-05 13:55
MemberJames R. Twine28-Jan-05 13:55 
Generalpopulate list view in VB from VC++ dll using SendMessage Api Pin
Mohamed Jaffar Sagir27-Jan-05 21:05
MemberMohamed Jaffar Sagir27-Jan-05 21:05 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
S Douglas27-Jan-05 23:33
professionalS Douglas27-Jan-05 23:33 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
Mohamed Jaffar Sagir28-Jan-05 1:54
MemberMohamed Jaffar Sagir28-Jan-05 1:54 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
S Douglas28-Jan-05 3:52
professionalS Douglas28-Jan-05 3:52 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
Mohamed Jaffar Sagir28-Jan-05 4:15
MemberMohamed Jaffar Sagir28-Jan-05 4:15 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
S Douglas31-Jan-05 1:07
professionalS Douglas31-Jan-05 1:07 
GeneralRe: populate list view in VB from VC++ dll using SendMessage Api Pin
James R. Twine28-Jan-05 2:58
MemberJames R. Twine28-Jan-05 2:58 

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.