hello
when i want to build this project in window 10 with vs2019 i got this error I search alot but cant fix them
Severity Code Description Project File Line Suppression State Error C2248 'web::json::value::string': cannot access private member declared in class 'web::json::value' PonimaServer C:\Users\MahdiMz\source\repos\PonimaServer\microsvc_controller.cpp 46
and this is project code
void MicroserviceController::handleGet(http_request message) {
auto path = requestPath(message);
if (!path.empty()) {
if (path[0] == "service" && path[1] == "test") {
auto response = json::value::object();
response["version"] = json::value::string("0.1.1");
response["status"] = json::value::string("ready!");
message.reply(status_codes::OK, response);
}
}
else {
message.reply(status_codes::NotFound);
}
}
Severity Code Description Project File Line Suppression State Error C2678 binary '==': no operator found which takes a left-hand operand of type 'const utility::string_t' (or there is no acceptable conversion) PonimaServer C:\Users\MahdiMz\source\repos\PonimaServer\foundation\basic_controller.cpp 43
Error C2664 'web::uri::uri(const web::uri &)': cannot convert argument 1 from 'const std::string' to 'const utility::char_t *' PonimaServer C:\Users\MahdiMz\source\repos\PonimaServer\foundation\basic_controller.cpp 39
Error C2664 'web::uri_builder &web::uri_builder::set_host(const utility::string_t &,bool)': cannot convert argument 1 from 'std::string' to 'const utility::string_t &' PonimaServer C:\Users\MahdiMz\source\repos\PonimaServer\foundation\basic_controller.cpp 44
Hi, I had a same problem, and I found , for example instead of "service" I am using utility::conversions::to_string_t("service") , so conversion is added for strings.
hello when i want to build this project in window 10 with vs2019 i got this error I search alot but cant fix them
and this is project code
and else this is endpointURI error
here is project code
and i got this error
your help will makes me happy thanks alot