Hallo my friends, I'm programming in c++ under an UNIX machine and I would like to get the name of the machine and put it in a variable of type char*. How can I do it?
I know I can do: system("hostname" but the return value is an integer and I would want to get the name.
Thanks in advance, I will be very grateful.
Jose.
I know I can do: system("hostname" but the return value is an integer and I would want to get the name.
Thanks in advance, I will be very grateful.
Jose.