This is how it works:
ifstream list("../../../.Alarm_clock/output.txt"); So - no:
ifstream list("$HOME/.Alarm_clock/output.txt"); As far as I can judge about Linux (I'm not too knowledgeable in it), $HOME is an indication for the shell to substitute the value of the HOME environment variable. What the ifstream constructor naturally does not do.
Use the appropriate function - as I understand it, getenv("HOME") , and collect the full path to the file.
Source: https://ru.stackoverflow.com/questions/691952/
All Articles
$HOMEautomatically open up on the way? It seemed to me that this shell does :) - Harry