读书人

在用线程时提示constructor出错,该如何

发布时间: 2012-03-19 22:03:04 作者: rapoo

在用线程时提示constructor出错
帮忙看下,我在用constructor构造线程类时,提示错误.
constructor tthreadquery.create(query:tadoquery;datasource:tdatasource);
begin
fquery:=query;
fdatasource:=datasource;
freeonterminate:=false;
end;

提示如下错误
statement excepted but 'constructor ' found

不知道什么意思,请告知一下

[解决办法]
前面的语句有问题。

很可能是少了 end;
[解决办法]
procedure ttt.Execute;
begin
{ Place thread code here }


constructor ttt.Create(a: string);
begin

end;

一楼说的对,
[Error] Unit2.pas(37): Statement expected but 'CONSTRUCTOR ' found

读书人网 >.NET

热点推荐