#define as unsigned char

时间:2014-03-07 10:47:30

标签: c c-preprocessor unsigned-char

我想知道如何告诉编译器#define unsigned char

#define SET_BITS_LOW 0x80

此处SET_BITS_LOW是,默认 int ,但我想要 unsigned char

1 个答案:

答案 0 :(得分:5)

您可以尝试这样:

#define SET_BITS_LOW  ((unsigned char)0x80)