OmicronVega
OmicronVega

Reputation: 21

C++ Programming: Navigating to user files to save my application data for each user

I'm trying to access the C:\Users\...

However, each computer has a different user name. I know there is a way to navigate via code to do this, but I can't for the life of me find an answer to this specific problem.

What should I place in ?

Upvotes: 1

Views: 172

Answers (1)

Ákos Kovács
Ákos Kovács

Reputation: 571

Windows has a feature called specal folder names. For example you can use %windir% to locate the windows directory. As I see you need the %USERPROFILE%. You can find more about this, at Wikipedia.

Upvotes: 1

Related Questions