469,142 Members | 1,129 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,142 developers. It's quick & easy.

Error code expecting ; before string constant.

2 2Bits
the error is in this section of the code, first code I've ever attempted any useful tips to remembering how to avoid or fix this issue would be greatly appreciated
cout << "==>\aPlayer "<<--player" win ";
else;
cout <<"==>\aGame draw";
cin.ignore();
cin.get();
Aug 7 '21 #1

✓ answered by dev7060

cout << "==>\aPlayer "<<--player" win ";
Probably meant to be this
Expand|Select|Wrap|Line Numbers
  1. cout << "==>\aPlayer " << player << " wins ";
else;
No effective statement(s) under else.

1 2603
dev7060
489 Expert 256MB
cout << "==>\aPlayer "<<--player" win ";
Probably meant to be this
Expand|Select|Wrap|Line Numbers
  1. cout << "==>\aPlayer " << player << " wins ";
else;
No effective statement(s) under else.
Aug 7 '21 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by polilop | last post: by
10 posts views Thread by Steve Pope | last post: by
5 posts views Thread by ken s | last post: by
FLPerras
2 posts views Thread by FLPerras | last post: by
20 posts views Thread by karthikbalaguru | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.