[求助]编译通不过
procedure TForm1.gethostbynameClick(Sender: TObject);
var
cr:string;
err:integer;
host:hostent;
op:pchar;
begin
host:=gethostbyname(pchar(edit1.Text));
except
if host=NIL then
begin
edit2.Text:='host does not exit';
exit;
end;
cr:=copy('host.h_addr',4,0 );
edit3.Text:=format('%d.%d.%d.%d',[ord(cr[1]),ord(cr[2]),ord(cr[3]),ord(cr[4])]);
edit2.Text:=host.h_name;
end;
其中host:=gethostbyname(pchar(edit1.Text));
这句编译通不过,大家来看看出了什么问题了,谢谢啊.