2008-12-16から1日間の記事一覧
昨日に引き続き、継承の勉強。今度はprotectedで継承した場合。protectedで継承すれば基本クラスのpublicとprotectedのメンバは派生クラスのprotectedメンバとなる。 #include <iostream> using namespace std; class base { public: void func() {} }; class PrivateB</iostream>…
昨日に引き続き、継承の勉強。今度はprotectedで継承した場合。protectedで継承すれば基本クラスのpublicとprotectedのメンバは派生クラスのprotectedメンバとなる。 #include <iostream> using namespace std; class base { public: void func() {} }; class PrivateB</iostream>…