K
kunwyf12345
Unregistered / Unconfirmed
GUEST, unregistred user!
我将ip192.168.1.203用inet_addr转换,iplong=inet_addr(pchar('192.168.1.203'));如果iplong为ulong或dword,返回的值为3405883584,c++例子中'192.168.1.203'的网络值定义为dword,值却是3232235979,我用(203 shl 24)+(1 shl 16)+(168 shl 8)+192却报错constant expression violates subrange bounds ,请问是我的iplong定义的范围不对吗?还是为什么怎么跟c++里的结果不一样?