Open DragonOsman opened 6 years ago
FWIW I am seeing this in version 2.10.13:
.../cpprest/http_msg.h(716): error C2039: 'to_utf16string': is not a member of '`global namespace''
.../cpprest/http_msg.h(716): error C3861: 'to_utf16string': identifier not found
The error seems to be coming from the default value of the second function parameter here in cpprest/http_msg.h
:
void set_body(const utf16string& body_text,
utf16string content_type = utility::conversions::to_utf16string("text/plain"))
The same error occurs at least in two other places in that file.
When trying to compile the app shown in the Getting Started Intro article for Cpprestsdk with the /permissive- compiler switch on, I got these error messages:
I also have a warning about /sdl vs. /gs-, minus but that doesn't matter here.
And removing the /permissive- allows the code to compile, but when I run it, I get the following unhandled exception in xmemory0 in the function _Deallocate():
So I need help with fixing the exception error and also with getting the /permissive- flag to work with the Cpprestsdk. Thanks in advance for any help.
Edit: Here's my code:
As you can see, I tried to catch a std::invalid_argument exception. That didn't help, though. So what should I do?