運算符重載舉例

  #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()
相關文章
相關標籤/搜索