gcc Warning: Array index has type 'char'
While trying to compile a programme, i get the following warning:
tokenizer.cpp:121: warning: array subscript has type 'char' The array is a table mapping special meanings to the ASCII character sets. For instance i want to extract quotes, whitespace and such: Code:
#include <stdio.h> I am using gcc 4.3.0 |
Cast it to int. But I can't see why it's giving a warning for a lossless conversion.
|
That did the trick.
Thank you. |
Quote:
|
That makes sense. I've been bitten by signed chars a few times.
|
All times are GMT -5. The time now is 11:40 AM. |