当前位置:网站首页>Common (Consortium)
Common (Consortium)
2022-07-19 05:30:00 【Learn to put down ta】
Shared body ( union )
The difference with the structure is that the address of the common body is the same , Only one member can be used at a time , The space occupied by the community is greater than or equal to the largest data structure in the member . Initialization can only initialize one .
union name {
member 1;
member 2;
member 3;
...
}
Enumeration type
Statement
enum day{
monday,tuesday,wednesday,thursday,friday,saturday,sunday};// This is an enumeration constant
enum day today;// This is an enumeration variable
today = monday;// Assign a value to a variable
The data type corresponding to the enumeration constant is int The default from the 0 Start , Add one... In turn , You can customize , For example, put Monday The assignment is 10, Add one after the other , If the Wednesday The assignment is 10, Then the first two are 0,1, And then 10, Add one... In turn .
边栏推荐
猜你喜欢
随机推荐
Rk356x u-boot Institute (command section) 3.4 usage of MEM memory related commands
性能瓶颈查找-火焰图分析
Syntax differences between PgSQL and Oracle (SQL migration records)
jvm学习
Excel template export of easypoi
List与Map
线程池如何监控,才能帮助开发者快速定位线上错误?
[first launch in the whole network] one month later, we switched from MySQL dual master to master-slave
Pgsql与Oracle语法差异(SQL迁移记录)
Constants and constant pointers
A comprehensive performance optimization, from 5 seconds to 1 second
redis源码分析 2 迭代器
11.数据仓库搭建之DWS层搭建
C语言的宏定义
ETL tool -- kettle realizes simple data migration
Interviewer: how to solve the problem of a large number of requests for data that does not exist in redis, which affects the database?
mysql的事务
MYSQL基本语法字典
从20s优化到500ms,我用了这三招
10问10答:你真的了解线程池吗?









