Hi guys so I quickly wrote a test program to show you the issue I am having.
I am using fstream to write data to a file for my game so they can load and save their variables.
#include <iostream>
#include <fstream>
#include <string>
int main()
{
std::ofstream outputFile;
outputFile.open("PlayerData"); // This creates the file
std::string Name;
int Age;
std::cout << "Your Name: ";
std::cin >> Name;
outputFile << Name << std::endl;
std::cout << "Your Age: ";
std::cin >> Age;
outputFile << Age << std::endl;
outputFile.close();
return 0;
}
When I run the program it creates the "PlayerData" file in:
Visual Studio 2013\Projects\TestFilePathing\TestFilePathing
Everything works fine but I would like for instead of the PlayerData file being dumped into the TestFilePathing directory, i'd like to path it to be created into a sub directory for organization purposes.
Thanks :D