Click here to Skip to main content
15,905,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPlaying a Avi file in dialog windows Pin
mt_samiei13-Oct-06 3:06
mt_samiei13-Oct-06 3:06 
AnswerRe: Playing a Avi file in dialog windows Pin
Christian Graus13-Oct-06 3:15
protectorChristian Graus13-Oct-06 3:15 
GeneralRe: Playing a Avi file in dialog windows Pin
mt_samiei13-Oct-06 3:20
mt_samiei13-Oct-06 3:20 
GeneralRe: Playing a Avi file in dialog windows Pin
Christian Graus13-Oct-06 3:25
protectorChristian Graus13-Oct-06 3:25 
GeneralRe: Playing a Avi file in dialog windows Pin
mt_samiei13-Oct-06 3:30
mt_samiei13-Oct-06 3:30 
GeneralRe: Playing a Avi file in dialog windows Pin
Hamid_RT13-Oct-06 3:30
Hamid_RT13-Oct-06 3:30 
AnswerRe: Playing a Avi file in dialog windows Pin
Hamid_RT13-Oct-06 3:30
Hamid_RT13-Oct-06 3:30 
QuestionPrivate inheritance Pin
sawerr13-Oct-06 3:06
sawerr13-Oct-06 3:06 
I am reading here c++ faqs Private inheritance section: http://www.parashift.com/c++-faq-lite/private-inheritance.html

There is an expression that i don't understand.They said :"Private inheritance makes all of the public functions of the parent class private in the child class".

So i understand that we can not reach them from derived class.But with "::" operator we can reach the functions.I don't understand the magic of this operator.I know it is scope resolution operator but is this also can reach private sections of the classes?
Or is this extraordiary rule for private inherintance.
class Wilma {<br />
 protected:<br />
   void fredCallsWilma()<br />
     {<br />
       std::cout << "Wilma::fredCallsWilma()\n";<br />
       wilmaCallsFred();<br />
     }<br />
   virtual void wilmaCallsFred() = 0;   // A pure virtual function<br />
 };<br />
 <br />
 class Fred : private Wilma {<br />
 public:<br />
   void barney()<br />
     {<br />
       std::cout << "Fred::barney()\n";<br />
       Wilma::fredCallsWilma(); //this can reach private function<br />
     }<br />
 protected:<br />
   virtual void wilmaCallsFred()<br />
     {<br />
       std::cout << "Fred::wilmaCallsFred()\n";<br />
     }<br />
 };<br />
<br />
also<br />
 class D_prot : protected B {<br />
 public:<br />
   using B::f;  // Note: Not using B::f(int,float)<br />
 }

AnswerRe: Private inheritance Pin
Zac Howland13-Oct-06 4:10
Zac Howland13-Oct-06 4:10 
GeneralRe: Private inheritance Pin
sawerr13-Oct-06 4:27
sawerr13-Oct-06 4:27 
GeneralRe: Private inheritance Pin
Nemanja Trifunovic13-Oct-06 5:12
Nemanja Trifunovic13-Oct-06 5:12 
GeneralRe: Private inheritance Pin
Zac Howland13-Oct-06 5:28
Zac Howland13-Oct-06 5:28 
GeneralRe: Private inheritance Pin
Nemanja Trifunovic13-Oct-06 7:09
Nemanja Trifunovic13-Oct-06 7:09 
GeneralRe: Private inheritance Pin
Zac Howland13-Oct-06 7:14
Zac Howland13-Oct-06 7:14 
AnswerRe: Private inheritance [modified] Pin
Nemanja Trifunovic13-Oct-06 5:08
Nemanja Trifunovic13-Oct-06 5:08 
QuestionAdding a Progress Bar Pin
Javagal Srinath13-Oct-06 2:51
Javagal Srinath13-Oct-06 2:51 
AnswerRe: Adding a Progress Bar Pin
Hamid_RT13-Oct-06 3:03
Hamid_RT13-Oct-06 3:03 
AnswerRe: Adding a Progress Bar Pin
Galatei13-Oct-06 3:03
Galatei13-Oct-06 3:03 
AnswerRe: Adding a Progress Bar Pin
Amish shah13-Oct-06 3:15
Amish shah13-Oct-06 3:15 
AnswerRe: Adding a Progress Bar Pin
David Crow13-Oct-06 3:49
David Crow13-Oct-06 3:49 
Questioncopying selected items Pin
radhika2813-Oct-06 2:34
radhika2813-Oct-06 2:34 
AnswerRe: copying selected items Pin
Galatei13-Oct-06 3:00
Galatei13-Oct-06 3:00 
GeneralRe: copying selected items Pin
Mark Salsbery13-Oct-06 6:29
Mark Salsbery13-Oct-06 6:29 
GeneralRe: copying selected items Pin
radhika2813-Oct-06 18:40
radhika2813-Oct-06 18:40 
GeneralRe: copying selected items Pin
Mark Salsbery14-Oct-06 7:18
Mark Salsbery14-Oct-06 7:18 

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.