一個不知錯在哪裡的C++程式

看板Programming作者時間18年前 (2007/09/16 19:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
請問以下的C++語法,哪裡寫錯了呢? 因為我檢查過權限,並無錯誤,但是 執行時會跑出 「 59 C:\Documents and Settings\rong\桌面\test\test1_1.cpp no matching function for call to `triangle::sss()' 」 謝謝! 附上原始語法如下: #include<iostream> using namespace std; class triangle { public: void sss(double,double,char*); double volumn(); void high(double); void base(double); void name(char*); double high(); double base(); private: double _base; double _high; string _name; }; void triangle::sss(double high,double base,char *name) { _high = high; _base = base; _name = name; } void triangle::high(double high) { _high = high; } double triangle::high() { return _high; } void triangle::base(double base) { _base = base; } double triangle::base() { return _base; } void triangle::name(char *name) { _name = name; } int main() { triangle frist; frist.sss(5.0,4.0,"tony"); cout << frist.sss() << endl; system("pause"); } -- ┌─────KKCITY─────┐KKMAN團隊 全新力作 ◎◎KKBOX◎◎ bbs.kkcity.com.tw 知名歌手通通都有 所有新歌想聽就聽 └──From:140.109.139.186 ──┘※※ 內容豐富多元的線上音樂台 ※※ --
文章代碼(AID): #16xGpm00 (Programming)
文章代碼(AID): #16xGpm00 (Programming)