Make PATH a string. Append your filename to the PATH. (path = PATH + filename;) Use that (path.c_str()) to open your file.
That's not PATH. PATH is the environment variable that stores the directories the system uses to find executable files.
What PG said, but note that you can get the user's ~ with getpwuid().