如何令函数返回值为一个字符串数组?(100分)

  • 主题发起人 主题发起人 gxdx
  • 开始时间 开始时间
G

gxdx

Unregistered / Unconfirmed
GUEST, unregistred user!
如题。
还有:

unit HDCliSock;

interface
Uses ScktComp;

type THDCliSock=class (TClientSocket)
private
UserID:String;
UserName:String;
RecID:integer;
SessionID:integer;
public
function SendSerMsg(MsgStr:String):boolean;
function ReceiveSerMsg(MsgStr:String):boolean;


end;

implementation
function SendSerMsg(MsgStr:String):boolean;
begin
Result:=false;
end;
function ReceiveSerMsg(MsgStr:String):boolean;
begin
Result:=false;
end;
end.

他说我:Unsatisfied forword or external declaration : THDCliSock.SendSerMsg and THDCliSock.ReceiveSerMsg
怎么办啊?

 
粗心的同志,请改:
unit HDCliSock;
interface
Uses ScktComp;

type THDCliSock=class (TClientSocket)
private
UserID:String;
UserName:String;
RecID:integer;
SessionID:integer;
public
function SendSerMsg(MsgStr:String):boolean;
function ReceiveSerMsg(MsgStr:String):boolean;
end;

implementation
function THDCliSock.SendSerMsg(MsgStr:String):boolean;
begin
Result:=false;
end;
function THDCliSock.ReceiveSerMsg(MsgStr:String):boolean;
begin
Result:=false;
end;
end.
 
1:返回字符串数组:
type
StrArray=array of string;

function MyFunc:StrArray
begin

Result:=
end;
 
返回字符串数组请用TStrings参数比较好,
 
function THDCliSock.SendSerMsg(MsgStr:String):boolean;
~~~~~~~~~~~
 
function THDCliSock.SendSerMsg(MsgStr:String):boolean;
begin
Result:=false;
end;
function THDCliSock.ReceiveSerMsg(MsgStr:String):boolean;
begin
Result:=false;
end;
 

Similar threads

后退
顶部