const char の問題を示す gcc コンパイラからの警告があります。
警告を取り除く方法は?
ありがとう、マイケル
char * str_convert(int op) {
/*returns the string corresponding to an operation opcode. Used for screen output.*/
if(op == PLUS) {
return "plus";
}
else if (op == MULT) {
return "mult";
}
else if (op == SUBS) {
return "subs";
}
else if (op == MOD) {
return "mod";
}
else if (op == ABS) {
return "abs";
}
else if (op == MAX) {
return "max";
}
else if (op == MIN) {
return "min";
}
else {
return NULL;
}
}