procedure TForm1.Button1Click(Sender: TObject);
var
   SerialNum : pdword;
   a, b : dword;
   Buffer : array [0..255] of char;
begin
   if GetVolumeInformation('C:\', Buffer, SizeOf(Buffer), SerialNum,
   a, b, nil, 0) then
  Label1.Caption:=IntToStr(SerialNum^);
end;
在Label1.Caption:=IntToStr(SerialNum^);这一句报错:[Error] Unit1.pas(35): Illegal character in input file: ' ' ($A1A1)。该怎样改正?

解决方案 »

  1.   

    删掉以后依然抱错:[Error] Unit1.pas(35): Illegal character in input file: ' ' ($A1A1);[Error] Unit1.pas(35): There is no overloaded version of 'IntToStr' that can be called with these arguments.该怎样解决?
      

  2.   

    lijinghe1(副乡长)说得没错,
    你的空格在与句“Label1.Caption:=IntToStr(SerialNum^);”的前面,删除就可以了。
      

  3.   

    lijinghe1(副乡长)说得没错,
    你的空格在与句“Label1.Caption:=IntToStr(SerialNum^);”的前面,删除就可以了。