Get IP Address
Hi, i''ve been trying to get the numerical ip address of you computer when you connect to the internet. I''ve tried gethostname() it returns a string and then when I try and call gethostbyname() I just get the string of the name that the IP would resoulve to but not the actual ip address. Could someone please help me out.
If you have a hostname of the actual IP you can simply resolve it using one of the winsock functions. Its that function that you use before you connect to a server like "yahoo.com" to resolve it into a sockaddr struct or a string representing the numerical IP.
CorsairK8@Fnemesis.comLinux Debian/GNU RulezThis is my signitory!C Is Tha Best!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement