Invalid operands and overloaded function error

I am messing around with C++ and doing a ridiculously simple IO program, when I encountered an error. Here is the program

#include <iostream>

using namespace std;

int main()
char letter;

cout << "What's your favorite letter?" << endl;

cin >> letter;

cout << letter; "is your favorite letter." << endl;

return 0;

I try to compile using Code::Blocks when I receive this error

invalid operands of types 'const char [25]' and '<unresolved overloaded function type>' to binary 'operator<<'|
cout << letter; "is your favorite letter." << endl;

You have a semicolon after letter that is not supposed to be there.
Last edited on
Ah, thanks for the help, I edited my previous post as I fixed the problem. I made letter its own line with a semi-colon and ran the program just fine. Thank you very much.
Last edited on
Topic archived. No new replies allowed.