随笔分类 - C++学习笔记
摘要:常规class class Rectengle { int width, height; static int a; // 类的公共变量,允许类名直接访问 public: Rectengle(){}; Rectengle(int x, int y) : width(x), height(y) {};
阅读全文
摘要:struct /** * 这里的student相当于一个对象 * name|age是student的属性 */ struct student { string name; int age; }; // 初始化 student stu1; student.name = "XiaoMing"; stud
阅读全文

浙公网安备 33010602011771号