So I'm trying to save configs files on Documents instead of C:\ and isn't working for me...

I'm using this code
Code:
	{
		CreateDirectory("C:\\Users\\%username%\\Documents\\Naica\\", NULL); CreateDirectory("C:\\Users\\%username%\\Documents\\Naica\\", NULL);
		std::ofstream ofs("C:\\Users\\%username%\\Documents\\Naica\\" + name + ".cfg");
	}
The thing is that is working for C:\\ but not for that directory...