You could scan the string, replacing ~user by the appropriate directory. 

The POSIX function wordexp does that, and a few other things 


variable substitution, like you can use $HOME 
optional command substitution, like $(echo foo) (can be disabled)
arithmetic expansion, like $((3+4))
word splitting, like splitting ~/a ~/b into two words
wildcard expansion, like *.cpp
and quoting, like "~/a ~/b" remains that


Opening a file on unix using c++
All in the title. I'm looking for how to reference a local, not network, path, as a virtual drive letter. An innocuous example:  C:\Storage as G:
