1
test.c的...困惑termios.h常數
#include <termios.h>
#include <stdio.h>
int main() {
printf("%x\n",B600);
}
在我的系統中,這版畫 「8」。
海合會-M test.c的顯示
/usr/include/stdc-predef.h /usr/include/termios.h \
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
/usr/include/x86_64-linux-gnu/bits/types.h \
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
/usr/include/x86_64-linux-gnu/bits/termios.h \
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h /usr/include/stdio.h \
/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h /usr/include/libio.h \
/usr/include/_G_config.h /usr/include/wchar.h \
/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdarg.h \
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h
內/usr/include/x86_64-linux-gnu/bits/termios.h的:
#define B600 0000010
另一頭都沒有B600的定義。 8的價值從哪裏來?
八進制,即在給予保持禮物... – EOF