A
AYellow
Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下
文件Settings
Type
TSetting=class
private
FilePathName:string;
Public
function GetFilePathName:string;
end;
implementation
{ Setting }
function TSetting.GetFilePathName: string;
begin
result:=FilePathName
//在此出错
end;
文件Unit1
var
MainForm: TMainForm;
Setting:TSetting;
implementation
{$R *.DFM}
Unit1中一调用Setting.GetFilePathName就出错,说是读了不能读的地址,怎么回事?
FilePathName为何不能读?
文件Settings
Type
TSetting=class
private
FilePathName:string;
Public
function GetFilePathName:string;
end;
implementation
{ Setting }
function TSetting.GetFilePathName: string;
begin
result:=FilePathName
//在此出错
end;
文件Unit1
var
MainForm: TMainForm;
Setting:TSetting;
implementation
{$R *.DFM}
Unit1中一调用Setting.GetFilePathName就出错,说是读了不能读的地址,怎么回事?
FilePathName为何不能读?