Hi!
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 think you missed the point. This newsgroup is for C++. Altough you are
writing a C++ program, not all question go here. The C++ standard (which
this newsgroup is about) contains nothing about users home dirs. This is
why we cannot help you here.
Anyway, the operating system you are targeting may supply functions
which do what you want. The knowledge about these functions is not
covered here. You should look for a specific other newsgroup which
covers system calls of AIX OS. My guess goes to comp.unix.aix .
If nothing helps try to read the source code of "whoami".
My 2cents: I guess not all home dirs are "/home/username". I hope there
is a function to retrieve the complete correct path directly.
Frank