I wanted to compare a string without actually defining one of them as a string, something like this,
if (string == \"add\")
Do I have to de
In C++ the std::string class implements the comparison operators, so you can perform the comparison using == just as you would expect:
==
if (string == "add") { ... }
When used properly, operator overloading is an excellent C++ feature.