I recently installed VS 2017, and have ran into a weird sort of issue. Basically, I cannot use hard-coded strings without explicitly casting them to (char*). If I said something like Function("test")
, it would simply throw an error stating that const char* is incompatible with char*. I really don't want to stick with VS 2015 :(. Anybody know how to make VS recognize that these are the same thing?
Thanks a lot in advance.
VisualStudio 2017 15.5 started setting the /permissive-
flag for all new solutions, which disallows the implicit conversion of string literals to non-const char*
. You can edit the solution's properties to disable that flag while you update your codebase to conform to the C++ standard. It's listed as "Conformance mode" in the "Language" tab under "C/C++" in the project's properties.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments