Click to See Complete Forum and Search --> : ~/ and C++


tminos
11-12-2000, 01:13 AM
How do I find a persons home directory in C++? I'm writing a C++ version of the fetchmailsetup type program I made ealier in C and can't figure out how to find the persons home directory. Thanks.

jemfinch
11-12-2000, 01:17 AM
In C, I'd use getenv("HOME").

Jeremy

:strain:
11-12-2000, 03:03 AM
as jemfinch said i believe setenv is in <unistd.h>

just include it into your C++ program and it will work fine.