当前位置:网站首页>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 .
边栏推荐
猜你喜欢

Web3js development technology

线程池如何监控,才能帮助开发者快速定位线上错误?

Online software testing training institutions lemon class and itest AI platform achieves strategic cooperation

ArcMap creates a constant grid and tessellates it into a new grid

在 CDP中使用Iceberg 为数据湖仓增压

解决idea新建module 提示module xxxx does exitst

Distributed storage fastdfs

Nacos configuration management

聊聊写代码的20个反面教材

Redis source code analysis skip table implementation
随机推荐
MySQL--触发器与视图
Swagger配置与使用
MYSQL基本语法字典
mysql的事务
操作系統常見面試題
使用Flink SQL传输市场数据1:传输VWAP
10问10答:你真的了解线程池吗?
柠檬班软件测试培训可靠吗 这个从培训班逆袭成功的案例告诉你
Wechat applet learning notes
MySQL安装配置教程(超级详细)
ETL工具——kettle实现简单的数据迁移
时间差计算
线上软件测试培训机构柠檬班与iTest.AI平台达成战略合作
Easypoi之excel模板导出
mysql的锁
Buuctf miscellaneous - QR code
[AI] action recognition using simple neural network -- Based on coco key points
ECS deployment web project
H5 page uses JS to generate QR code
特殊指针的一些应用