I'd like to find a c++ function that (if the program is run from the command prompt) decodes the user's current default prompt string (generally just PS1) and stores it as a string variable.
I found this, but I also found it pretty confusing and am not even sure it's the same question. Any advice?