opening file in home dir with C++
I am writing a program and I want it to be able to open a file from the users home directory. if the program is in /bin or somewhere how would I do that?
I have tried somthing like ofstream(~/thefile); but that doesn't seem to work.
~ is just a shell completititon variable that sh uses.
see "man getenv"
|All times are GMT -5. The time now is 10:22 PM.|