Cpp:类定义范例;
#include <iostream>
using namespace std;
class Box{
public:
double length;
double breadth;
double height;
};
int main(){
Box Box1;
double volume=0.0;
Box1.height=5.0;
Box1.length=6.0;
Box1.breadth=7.0;
volume=Box1.height*Box1.length*Box1.breadth;
cout << volume << endl;
return 0;
}
你的文章内容非常精彩,让人回味无穷。 https://www.yonboz.com/video/59274.html