标签:style blog ar io color os sp on div
#include <iostream> using namespace std; class Chain { public: bool Handle() { return false; } }; class Level1 : public Chain { public: bool Handle() { cout<<"Level1::true"<<endl; return true; } }; class Level2 : public Level1 { public: bool Handle() { cout<<"Level2::Handle"<<endl; return Level1::Handle(); } }; class Level3 : public Level2 { public: bool Handle() { cout<<"Level3::Handle"<<endl; return Level2::Handle(); } }; int main(int argc, char *argv[]) { Level3 level3; level3.Handle(); return 0; }
标签:style blog ar io color os sp on div
原文地址:http://www.cnblogs.com/stanley198610281217/p/4167448.html