Reputation: 29507
I'm learning C++ and i want to know how i can print the IP adress of the host machine, but remember that my program is a command line aplication(cmd), but i don't want the code, but some links here i can learn this, not copy and paste. Thanks!
Upvotes: 0
Views: 359
Reputation: 1903
Check this out: Socket Programming.
Winsock looks like a good choice.
Upvotes: 1
Reputation: 21079
It's a very good approach to ask for something to learn, not ready code.
Read this if you are on Linux: Get the IP address of the machine
...or this if you are on Windows: http://www.codeguru.com/forum/showthread.php?t=233261
You could have found this on your own with a simple Google search.
// Edit: DeusAduro's link for Windows was much better. Changed it.
Upvotes: 1