std::cout << "Enter a quotation:\n";
std::getline(std::cin, quote);
std::cout << "Enter the name of the author:\n";
std::getline(std::cin, speaker);
std::cout << "\n";
std::cout << "This is the quote you entered:\n\n" << quote << "\nby: " << speaker << "\n\n";
//Define a file object
std::ofstream fileOutput("quotes.txt", std::ios::app);
//If the file is open, record the data
if (fileOutput.is_open()) {
//Write the data to the file
fileOutput << quote << "|" << speaker << "\n";
//Close the stream
fileOutput.close();
//Print a message
std::cout << "The quote has been saved!";
} else {
//Couldn't open file
std::cout << "The file could not be opened!";
//Indicates a problem has occured
return 1;
}