I am converting a shell script to C++. I already know how to find the
calling user's username in a shell script, which is just the whoami
command. I need to know if there is a way to find either the calling
user's username or the calling users home directory in C++.
I know one way to do this would be to call system() from stdlib.h and
save the result into a file but that is a horrible solution.