What datatype to use to store 1 byte of number data in C/C++
When I practice and do coding at home using the MinGW compiler For storing 1 byte of datum I usually use the datatype 'char' which might be signed and unsigned or whatever is needed. I have never faced any problem compiling the code on MinGW and the code executes fine in my computer. When I was asked to show my own presentation at the training center I used the same code and compiled it. Although I could execute the code Compiler gave a warning . I don't really remember the exact warning message right now, but it was something like , "warning: storing integer data in char type". That computer was using Visual C++ 6.0. But I have never had this problem in my MinGW compiler So what should I use to store 1 byte of datum that is a number ? , char or int_8t ?