小弟要在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,從光碟抓下來執行也沒問題..
為什麼偏偏小弟用一樣的作法就有問題哩??