初学C++,一个学习拷贝构造函数的demo,在clang下编译后运行结果与想象中大有不同啊。
#include <cstdlib>
#include <iostream>
using namespace std;
class Rectangle {
public:
double length, width;
public:
double getArea();
double getLength() { return length; }
double getWidth() { return width; }
Rectangle(double l, double w) {