Answers for "how to compare a char with spce 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

Browse Popular Code Answers by Language