| thereallynewguy (3) | |||
Hello all, I'm really sorry if this as been posted already. I looked around and couldn't find an answer. Here's the whole code:
Whenever I run it, I keep getting the same error: error: no match for 'operator==' in 'answer == 'y''I looked and looked and looked, but I failed to see how to resolve this issue. What am I missing? cheers, New Guy | |||
|
|
|||
| HiteshVaghani1 (187) | |
You used answer as string so,answer == 'y' will definitely wrong because 'y' is for character though you used string as your data type you need to useanswer =="y"..
| |
|
|
|
| thereallynewguy (3) | |
| Oh my God! So simple! Worked, thank you friend. I set the identifier to char instead. If I were to use string anyhow, you say I would use quotations instead of apostrophes? | |
|
|
|
| HiteshVaghani1 (187) | |
|
ohh...that's great you change it to char... yes you need to use quotations instead of apostrophes while using string.. | |
|
|
|