c++中创建对象不需要用new比如Cube c1;此时就声明了一个Cube对象c++中,this关键字是指指向当前对象的指针 #include <iostream> using namespace std; class Student{ public: void setname(char *name); void setage(int age); void setscore(float score); void show(); private: char *name; int age; float score; }; ...