# VBForums CodeBank > CodeBank - C++ >  Getting the current user profile path in c++

## silentthread

Here is how you do it...



```
#include <iostream>
#include <windows.h>
#include <conio.h>

using namespace std;

int main()
{
char profilepath[250];
ExpandEnvironmentStrings("%userprofile%",profilepath,250);

cout << profilepath;

getch();
return 0;
}
```

----------

