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
If you can use Boost, you can do this to easily get the host name:
#include // ... whatever ... const auto host_name = boost::asio::ip::host_name();