So I want to be able to open up the file after the console closes and be able to continue adding to the file.
int main(){
string inputWord;
ofstream
http://www.cplusplus.com/reference/fstream/fstream/open/
at here there is an example also.
// fstream::open / fstream::close
#include <fstream> // std::fstream
int main () {
std::fstream fs;
fs.open ("test.txt", std::fstream::in | std::fstream::out | std::fstream::app);
fs << " more lorem ipsum";
fs.close();
return 0;
}
You have to open the file stream in append mode:
std::ofstream out("Info.txt", std::ios_base::app);
// ^^^^^^^^^^^^^^^^^^