Random guessing game error

Can please someone tell me why when i run this code ive get this error:
Invalid operands to binary expression
('ostream'(aka'basic_ostream'<char>') and 'const char*')

This error is on line 18 (cout << "gshshshme"\n";

Here is te code:

#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;

int main()
{
srand(time(0));

int number = rand() % 99 + 1;
int guess;
int tries = 0;

cout << "sggshhshhxygs\n";
here:
if(tries > 10)
{
cout >> "gshshshme\n";
}

cout << "jenekkdkd\n";
cin >> guess;
if(guess > 100 || guess < 1)
{
cout << "nncncnnvwos\n";
goto here;
}else if(guess > number){
tries++;
cout << "bsoaksoosksksc\n";
goto here;
}else if(guess < number){
tries++;
cout << "dghdujmala\n";
goto here;
}else if(guess = number){
cout << "hshbhxyywbvv\n";
}

}
Pay attention to what direction the angle brackets are pointing.
Last edited on
if (tries > 10)
{
cout >> "gshshshme\n"; // <-- this is the error
}

You're using >> for cout, you should use <<
Thank you I didnt notice this.
Topic archived. No new replies allowed.