c++ 直接定义二进制变量
#include <iostream>
#include <cstdio>
int main (int argc, char *argv[]) {
int a = 0b11111111;
int b = 123;
int c = 0173;
int d = 0x7B;
int e = 0x3.ABCp-10;
int f = 100'00'00;
printf("%d\n", a);
return 0;
}
#include <iostream>
#include <cstdio>
int main (int argc, char *argv[]) {
int a = 0b11111111;
int b = 123;
int c = 0173;
int d = 0x7B;
int e = 0x3.ABCp-10;
int f = 100'00'00;
printf("%d\n", a);
return 0;
}