Hi guy .
I don`t known how to convert IP to hex .
In this link http://www.mustat.com/ (Ip host codeguru.com) . I see hex IP : Hex IP 0x462a1779
I want to convert IP "" to "0x462a1779"

#include <winsock.h>
#include <windows.h>
#include <stdio.h>

UINT32 ip_to_hex(UINT32 ip_add)
   UINT32 ip_hex;
   //code convert ip to hex
   return ip_hex; 

void main()
Did you try IP "" , IP hex : 0x7b1e800a
When i try "%x" , it`s wrong

        printf("%x \n", 123);
	printf("%x \n", 30);
	printf("%x \n", 128);
	printf("%x \n", 10);

And this is result
7b 1e 80 and a , not 0a
further i think we must separate each octect by a (dot) . , Then convert decimal to hexa
Can you help me ?
Thank guy.