Like this code, the C++ compiler will convert char* to bool and then call the first function, which is inconsistent with my original intention. Is there any way to prevent the compiler from performing type conversions that I don’t want? Like “-fno-permissive”, but unfortunately, it doesn’t work. Answer How to explicitly call the specified overload function? Convert the argument at
Tag: compiler-warnings
How can I make my program compile without warning?
I should compile my program with spec flags to gcc. Then gcc complained about return values not taken care of. WhenI use variables to take the return values then gcc complains again: How can I resolve the warnings? My program is as follows. Answer Reading between the lines, I guess the original problem you were trying to solve was a