搜索结果
查询Tags标签: Cherno,共有 4条记录-
C++学习笔记|Inheritance|Cherno C++ Tutorials
派生类包含了基类的所有内容 #include <iostream> class Parent{ public:float x,y;Parent(){x=0;y=0;}void print(){std::cout<<x<<","<<y<<std::endl;} }; class Son:public Parent{//这里的public是继承方式 可以是public pri…
2021/7/16 11:19:41 人评论 次浏览 -
C++学习笔记|Inheritance|Cherno C++ Tutorials
派生类包含了基类的所有内容 #include <iostream> class Parent{ public:float x,y;Parent(){x=0;y=0;}void print(){std::cout<<x<<","<<y<<std::endl;} }; class Son:public Parent{//这里的public是继承方式 可以是public pri…
2021/7/16 11:19:41 人评论 次浏览 -
C++学习笔记|Enum枚举类型|Cherno C++ Tutorials
#include <iostream> class Log{ public:enum Level{Error=0,Warning,Info}; private:Level m_level=Info;//the prefix indicates member variable so you can differentiate it from local variables public:void Error_msg(const char * msg){if(m_level>=Err…
2021/7/15 22:07:31 人评论 次浏览 -
C++学习笔记|Enum枚举类型|Cherno C++ Tutorials
#include <iostream> class Log{ public:enum Level{Error=0,Warning,Info}; private:Level m_level=Info;//the prefix indicates member variable so you can differentiate it from local variables public:void Error_msg(const char * msg){if(m_level>=Err…
2021/7/15 22:07:31 人评论 次浏览