Hi,
Tried that, when I compiled I got
error: incompatible type for argument 1 of 'inet_ntoa'
Any thoughts? Here is the remainder of the code:
int main(int nArg, char* pszArgs[])
{
char ipaddr[15]="127.0.0.1";
long x;
char ipaddrx[15];
x=inet_addr(ipaddr);
printf("inet_addr(%s)=%l\n
char* ipaddry=inet_ntoa(x);
printf("inet_ntoa(x)=%s\n"
return 0;
}
Thanks!
Main Topics
Browse All Topics





by: amit_gPosted on 2007-07-24 at 17:17:17ID: 19561262
char* ipaddress_r = inet_ntoa(x);