warning C6328: Size mismatch: <type> passed as parameter <number> when <type> is required in call to <function>
For C runtime character-based routines in the family name isxxx(), passing an argument of type char can have unpredictable results. For example, an SBCS or MBCS single-byte character of type char with a value greater than 0x7F is a negative value. If a char is passed, the compiler might convert the value to a signed int or a signed long. This value could be sign-extended by the compiler, with unexpected results. For example, isspace accepts an argument of type int; however, the valid range of values for its input argument is:
0 <= c <= 255, plus the special value EOF.
By default, char is a signed type in Visual C++, so the range of values of a variable of type char is -128 <= c <= 127. Therefore, if you did the following:
c would be sign-extended to a signed int with a value of -37, which is outside the valid range for isspace.
To correct this problem, you can use static_cast, as shown in the following code: