运算符重载举例

  #include<iostream>//定义三角形类,底和高,然后定义一个重载运算符的定义。 using namespace std; class triangle { private: float wide; float high; public: void set(float a,float b){wide=a,high=b;}; float area()
相关文章
相关标签/搜索