/J (Default char Type Is unsigned)
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
Changes the default
char type from
signed char to
unsigned char, and the
char type is zero-extended when it is widened to an
char value is explicitly declared as
signed, the /J option does not affect it, and the value is sign-extended when it is widened to an
The /J option defines
_CHAR_UNSIGNED, which is used with
#ifndef in the LIMITS.h file to define the range of the default
ANSI C and C++ do not require a specific implementation of the
char type. This option is useful when you are working with character data that will eventually be translated into a language other than English.
If you use this compiler option with ATL/MFC, an error might be generated. Although you could disable this error by defining
In Solution Explorer, open the shortcut menu for the project and then choose Properties.
In the project Property Pages dialog box, in the left pane under Configuration Properties, expand C/C++ and then select Command Line.
In the Additional Options pane, specify the /J compiler option.