Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[BCB]不能使用overload constructor..?

0 views
Skip to first unread message

jsw...@vlsi1.iie.ncku.edu.tw

unread,
Aug 20, 1997, 3:00:00 AM8/20/97
to

小弟要在form中多加一個constructor以便傳遞初始資料..

在header file中宣告如下:
class TThreshold : public TForm
{....
.....

__fastcall TThreshold( BYTE**,int ,int,TComponent* Owner );
__fastcall TThreshold(TComponent* Owner);

....
....
}

然後在另一個form中使用如下的程式碼:(BYTE **GrayImage;)

TThreshold *Threshold=new TThreshold(GrayImage,ChildForm->ClientHeight,
ChildForm->ClientWidth,this);


但是complier總是出現
[C++ Error]Main.cpp(53):Could not find a match for 'TThreshold::TThreshold
(unsigned char **,int,int,TMainForm * const)'.

我看programmer's guide p6-4也是教我們這樣用..
BCB Unleashed Ch21也有個範例宣告兩個constructor,從光碟抓下來執行也沒問題..

為什麼偏偏小弟用一樣的作法就有問題哩??


0 new messages