What's wrong with this, output question

#include <iostream>
#include <string>
#include <fstream>
using namespace std;
int main()
{
string quote, speaker;
cout << "Enter a quotation" << endl;
getline(cin, quote);
cout << "Enter the person" << endl;
getline(cin, speaker);
cout << "\n";
cout << "The following quote has been received" << endl;
cout << quote << "\n-" << speaker << "\n";
ofstream fileOutput ("quotes.txt", std::ios::app);
if (fileOutput.is_open())
{
fileOutput << quote << "|" << speaker < "\n"; //SOMETHING WRONG HERE
fileOutput.close();
cout << "The data has been written to the file\n";
}
else
{
cout << "File could not open" << endl;
return 1;
}
cout << "Press enter" << endl;
cin.get();
return 0;
}
Read this before you post again: http://www.cplusplus.com/forum/beginner/1/
And put that in code tags.
Be careful with typos. It's <<, not <.
Topic archived. No new replies allowed.