ofstream
(C++ Builder)を使用してテキスト ファイルを特定のディレクトリに保存しようとしています。Windows 7 で問題が発生しています。
// Works fine at Windows XP and Windows 7
std::ofstream file1("Name.txt");
// Works fine at Windows XP but not at Windows 7
std::ofstream file1("Folder1/Name.txt");
// Works fine at Windows XP but not at Windows 7
std::ofstream file1("Folder1\\Name.txt");
Windows 7 を使用して「.txt」ファイルを特定のディレクトリに保存するにはどうすればよいですか?
OBS: Windows 7 を使用してプログラムを保存すると、ファイルは次の場所に保存されます。
C:\Users\Name\AppData\Local\VirtualStore\Folder1\Name.txt