In C++ you use == for comparison. The = is an assignment. It can be used in the condition of an if statement, but it’s going to evaluate to true unless the character is ‘
You are here: Home / How do I simply compare characters in C++?
by James Palmer
In C++ you use == for comparison. The = is an assignment. It can be used in the condition of an if statement, but it’s going to evaluate to true unless the character is ‘