我在 CppLint 上遇到了这个错误:
Using C-style cast. Use reinterpret_cast<xmlChar *>(...) instead [readability/casting] [4]
当我尝试投射这样的东西时:
xmlChar* something = (xmlChar*) anOtherThing;
但如果我这样做:
xmlChar* something = reinterpret_cast<xmlChar *>(anOtherThing);
我在构建时遇到此错误:
error: reinterpret_cast from type ‘const char*’ to type ‘xmlChar*’ casts away constness
请问你能帮帮我吗 ?