2 ms·
"There is no portable way to check whether the parameter is a string constant" Well, the compiler should warn you if you try to pass a (char const *) to a func
by Karellen 12y ago
"There is no portable way to check whether the parameter is a string constant"
Well, the compiler should warn you if you try to pass a (char const *) to a function expecting a (char *). Use -Wwrite-strings to make string literals have type (char const[]) rather than (char[]).