Answers for "how to compare a char to a string in c++ with the equality operator"

C++
2

how to compare two char* in c++

#include <string.h>
...
if (strcmp(firstSTR, secondSTR) == 0) {
    // strings are equal
    ...
} else {
    // strings are NOT equal
}
Posted by: Guest on January-14-2021

Code answers related to "how to compare a char to a string in c++ with the equality operator"

Browse Popular Code Answers by Language