助力软件开发企业降本增效 PHP / java源码系统,只需一次付费,代码终身使用! 广告
#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; }