1. 类内定义 , 类内实现

      1. class Student{
      2. public:
      3. Student(){
      4. cout <<"Student的构造函数"<<endl;
      5. }
      6. }
    2. 类内定义 ,类外实现 ```cpp class Student{ public: Student(); }

    Student::Student(){ cout <<”Student的构造函数”<<endl; } ```