Answers for "how to compare two char* in c++"

C++
1

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 two char* in c++"

Browse Popular Code Answers by Language