Why does this work?
#include #include using namespace std; int main(){ string s=\"a\"; if((s==\"cm\")||(s==\"in\")||(s==\"ft\")||
You're trying to check whether it's unequal to all of those strings, not whether it's unequal to any of those strings.
Use and, not or.