就商的附值不是这样写的吗??Label11.Caption:=inttostr(strtoint(Edit2.Text)/2000);提示错误为:
There is no overloaded version of 'IntToStr' that can be called with these arguments

解决方案 »

  1.   

    这里的除法应该用div,这是整除吧要不用strtofloat转化成浮点数,这时两个inttostr都该换成floattostr
      

  2.   

    是说:没有inttostr()的重载,因此不能使用该函数。
    实际上是你的参数不对,
    可以这样: inttostr(trunc(double型))
    trunc取整数;比如
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      Label11.Caption:=inttostr(trunc(strtoint(Edit2.Text)/2000));
    end;
      

  3.   

    不对!!按 Kshape([伟大的大伟!]) 给的代码!!
    好象求不出商来!!总不可能9195/2000=0吧
    再想想??
      

  4.   

    就商的附值不是这样写的吗??Label11.Caption:=inttostr(strtoint(Edit2.Text)/2000);
    -----------------------------------------------------
    大哥
    你是先把str转变成int,然后再把int转换成str
    有什么问题吗?如果你要得到你的想要的答案
    那就直接
    因该这样
    Label1.Caption:=floattostr(strtofloat(Edit1.Text)/2000);
    用floattostr而不是inttostr