问问题
1154 次
2 回答
2
Try changing this:
if (isdigit(input[0]))
to:
if (isdigit((unsigned char)input[0]))
or
if (isdigit((int)input[0]))
for more details see similar question: array subscript has type 'char'
于 2013-02-03T13:20:04.187 回答
1
This means that the index for the array can be negative.
This can be a problem as a char could represent a signed value, and you may be requesting a negative index.
于 2013-02-03T13:21:05.697 回答