in reply to (OT) cross-platform $HOME

On Windows, you could look for $ENV{USERPROFILE}, and store the info in "$ENV{USERPROFILE}\\Application Data\\myapp" - that is a convention many MS apps follow.

The "Application Data" folder is usually hidden, so it already captures the meaning of the leading ".".

Many 3'rd party apps in Windows store data either in the App directory, or a sub-directory. Small quantities of data and config info is stored in the Registry, but you probably don't want to touch that if you are writing a cross-platform app. In your case I'd recommend the "Application Data" directory above.

"Experience is a wonderful thing. It enables you to recognize a mistake when you make it again."