我需要打印contentType变量的值。
void WsListener::handle_put(http_request message)
{
http_headers& headers = message.headers();
utility::string_t contentType=headers.content_type();
cout << (string)contentType;
};
错误输出
Severity Code Description Project File Line Suppression State
Error C2440 'type cast': cannot convert from 'utility::string_t' to 'std::string' StolenDetailsService c:\users\nuwanst\source\repos\stolendetailsservice\stolendetailsservice\wslistner.cpp 65
Error (active) E0312 no suitable user-defined conversion from "utility::string_t" to "std::string" exists StolenDetailsService c:\Users\Nuwanst\source\repos\StolenDetailsService\StolenDetailsService\wsListner.cpp 65