I am developing an application. One of the methods needs to capture the computer name and user logged on the machine, then display both to the user. I need it to run on both Win
Use gethostname() to get computer name, support both windows and linux.
gethostname()