if statement and char arrays

Pages: 12
A string is a sequence of characters.
You want to read one string from the user, so you don't need an array with a whole 33 strings.

http://www.cplusplus.com/reference/string/string/
Last edited on
Ah, I thought I was defining the length of the string.

if (PlayerRN == "Jackson")


is giving the error, No operator "==" matches these operands.
Ah, I thought I was defining the length of the string.

You're not, that syntax declares an array.
http://www.cplusplus.com/doc/tutorial/arrays/

is giving the error, No operator "==" matches these operands.

The next step after identifying a problem is fixing it.
Topic archived. No new replies allowed.
Pages: 12