ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
#include <iostream> using namespace std; class A{ public: double length; A(double len){ cout << "a is creating..." << endl; length = len; } void setLen(double len){ length = len; } double getLen(){ return length; } ~A(); }; A::~A() { cout << "end ........" << endl; } int main(){ A a(33.0); // a.setLen(22.0); cout << a.getLen() << endl; }