/
githubmirror
/
CPlusPlusThings
Обзор
Документация
Войти
/
githubmirror
/
CPlusPlusThings
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
basic_content/bit/bit.cpp
18 строк
352 B
zhangxing
support bazel complie this project and format code.
30 мар 2024, 17:00
30 мар 2024, 17:00
3c8a3f2
Код
Авторство
О чём код?
#include <iostream> using namespace std; struct stuff { unsigned int field1 : 30; unsigned int : 2; unsigned int field2 : 4; unsigned int : 0; unsigned int field3 : 3; }; int main() { struct stuff s = {1, 3, 5}; cout << s.field1 << endl; cout << s.field2 << endl; cout << s.field3 << endl; cout << sizeof(s) << endl; return 0; }