public,protected,private

#include <iostream> using namespace std; class Animal { public: void eat() { cout<<"animal eat"<<endl; } protected: void sleep() { cout<<"animal sleep"<<endl; }
相關文章
相關標籤/搜索