#include <iostream> // Include library to work with files int main() { std::cout << "Insert the string to write to file: "; std::string input; std::getline(std::cin, input); std::cout << input; // Put your code }