I'd just like to find out, is it possible to export strings to files and then import them into the code later? I'm not sure if I've missed anything on the internet detailing this simply but those that I found, I could not understand. It would be great if someone could tell me how to export and then import them again, like a save file. Thanks! :)
If by export and import you meant to write the strings to a file and then read them later then that's possible, you'll just require to use the ofstream "output file stream " to write the strings to the file, later you can use the ifstream stream to read the strings again to your program.
#include <fstream>
#include <string>
usingnamespace std;
int main ()
{
ofstream out ("mystrings.txt", ios::app);
/// check if the file opened successfuly
out <</*write something to the file*/
out.close ();
/// more code here
ifstream in ("mystring.txt");
///check if your stream is alright
in>>/*read and use your previously saved data*/
in.close ();
}