I'm trying to use an equality operator on a particular variable but Visual Studio is letting me know that: "no operator "==" matches these operands".
I'm using Microsoft's cpprest library and this is a snippet from my code:
1 2 3 4 5 6 7 8 9 10 11
if (response.status_code() == status_codes::OK) {
auto body = response.extract_string();
json::value obj = json::value::parse(body.get());
auto type = obj.at(U("type"));
// Problem starts here
if (type == "login") {
//
}
}
If I print the variable 'type' using std::wcout, I get the json value I expected, but I can't seem to make any comparison, I'm assuming because the object doesn't support "=="? I'm a little confused.