Поделиться через


/J (Default char Type Is unsigned)

Changes the default char type from signed char to unsigned char, and the char type is zero-extended when widened to an int type.

/J

Remarks

If a char value is explicitly declared signed, the /J option does not affect it, and the value is sign-extended when widened to an int type.

The /J option defines _CHAR_UNSIGNED, which is used with #ifndef in the LIMITS.h file to define the range of the default char type.

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.

To set this compiler option in the Visual Studio development environment

  1. In Solution Explorer, right-click the project and then click Properties.

  2. In the project Property Pages dialog box, in the left pane under Configuration Properties, expand C/C++ and then click Command Line.

  3. In the Additional Options pane, specify the /J compiler option.

To set this compiler option programmatically

See Also

Tasks

How to: Open Project Property Pages

Reference

Compiler Options

Setting Compiler Options