An odd C++ error: test.cpp:15: error: passing ‘const *’ as ‘this’ argument of ‘*’ discards qualifiers

前端 未结 5 739
闹比i
闹比i 2020-12-23 21:13

I\'m having some trouble with a particular piece of code, if anyone can enlighten me on this matter it would be greatly appreciated, I\'ve isolated the problem down in the f

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-23 21:55

    For a quick and dirt solution, try compiling with -fpermissive as often suggested by the compiler itself (which is probably what VisualStudio compilers do, being that Windows users seldom report this problem).

提交回复
热议问题