【发布时间】:2015-06-30 17:37:58
【问题描述】:
如何编写两个具有相同名称但参数类型不同的函数,如下所示:
public
{ Public declarations }
function MsgW(const Msg:String):Integer;
function MsgW(const Msg:String;title:String):Integer;
function MsgW(const Msg:String;title:String):Integer;
Begin
Result := MessageboxW(0,Pchar(Msg),Pchar(title),MB_OK);
End;
function MsgW(const Msg:String):Integer;
Begin
Result := MessageboxW(0,Pchar(Msg),'MessageBoxW',MB_OK);
End;
【问题讨论】:
标签: delphi