Why I can't compile the code bellow?
string m = "MEOW";
pair <string, int> p = { "M", 0 };
if (m[0] == p.first)
p.second += 10;
I get the error:
main.cpp:18:14: error: invalid operands to binary expression ('int' and 'std::__1::basic_string<char>')
if (m[0] == p.first)
~~~~ ^ ~~~~~~~