Hello, is there some way I can take a txt file and have it wait for user input. This would work the same way as the console and cin. I do not want to read some premade text but rather wait for the user to type something into the file.
Thank you
// open the file
std::ofstream file( "file_name" ) ;
// write the lines entered by the user into the file one by one
std::string str ;
while( std::getline( std::cin, line ) file << line << '\n' ;