I want to create a txt file in another folder using fstream. You must know rpg games, right? there must be a save data system. to save our progress in the game, don't be happy if the save data file is mixed with the exe file. I've tried various ways.
for example
cin >> Save_Data;
ofstream Char_Pertama (("/RPG GAME PERCOBAAN/Save Data", Save_Data), ios :: out);
cin >> Save_Data;
ofstream Char_Pertama ("/RPG GAME PERCOBAAN/Save Data"); (Save_Data, ios :: out);
I have tried this one too...
cin >> Save_Data;
ofstream Char_Pertama ("../RPG GAME PERCOBAAN/Save Data/Save_Data", ios :: out);
But,the txt file is not up to us to name it. I wish, we can make the filename as we like.
please help me to solve this, your suggestions will be very helpful for me