oc结构
2024-09-02 06:25:35
结构 在oc中只能声明变量 不能声明函数和类
结构声明
struct DateT {
int month;
int day;
int year;
};
结构可以在起最后的分号之后定义结构变量,并且可以格式化
struct DateT {
int month;
int day;
int year;
}today{1,2,3};
结构可以不定义名字 ,但是要先声明变量
struct {
int month;
int day;
int year;
}today{1,2,3};
结构可以嵌套
struct DateT {
int month;
int day;
int year;
};
struct Time {
int hours
int seconds;
int min;
};
struct DateTime {
struct DateT date;
struct Time time;
}today{1,2,3};
调用和平常调用一样 就是多了一个嵌套
最新文章
- YII2-数据库数据查询方法,关联查询with, joinWith区别和分页
- 使用.NET读取exchange邮件
- 对于git的认识
- py变量
- hdoj 2050 折线分割平面
- MacOS U盘安装
- ssh登录失败处理步骤
- Android剪裁图片简单的方法
- Keepalived+Nginx提供前端负载均衡+主从双机热备+自动切换
- HDU1201 水题
- 2018-2019-1 20165205 ch02 课下作业
- 实战ELK(3) Kibana安装与简单实用
- walle多渠道打包+Tinker(bugly)热更新集成+360加固(乐固)
- Confluence 6 应该如何在我的空间中组织内容
- PMP基本概念
- Python+Selenium笔记(二):配置谷歌+IE环境
- 查看是否存在tomcat进程和关闭方法
- lua lua_settable
- bzoj3901
- Spring Boot学习——单元测试