Foundation框架基础 - 常用结构体
2015-08-10 00:28
316 查看
首先回忆一下C中的结构体的使用:
void test() { //定义Date这种结构体类型 struct Date { int year; int month; int day; }; //定义结构体变量 struct Date d = {2015,6,2}; d.day = 5; } void test2() { //通过 typedf 来更加简便的定义结构体 typedef struct Date { int year; int month; int day; } MyDate; MyDate d = {2015,6,2}; }
相关文章推荐
- Java生成字母和数字组成的随机字符串
- sed高级用法:模式空间(pattern space)和保持空间(hold space)
- 10进制数转16位2进制补码
- TCP三次握手及其背后的缺陷
- iOS应用内部切换语言,不跟随系统
- iOS 宏(define)与常量(const)的正确使用
- 《搜索引擎---信息检索实践》(读书笔记)
- POJ_1470_ClosestCommonAncestors
- HDOJ1698 Just a Hook(线段树)
- 如何在防火墙或路由器中禁止访问一些公司不相关网站
- 读写锁
- Codeforces Round #130 (Div. 2) A. Dubstep(STL做法)
- springMVC MultipartFile file文件上传及参数接受
- Microsoft Dynamics CRM server 2013 系统和SQL server 备份 为升级 CRM 2015版本准备
- Microsoft Dynamics CRM server 2013 系统和SQL server 备份 为升级 CRM 2015版本准备
- delphi之模拟点击网页中的按钮
- 算法题:求二进制位中0的个数
- 命名管道客户端及服务器端简单代码示例
- HDOJ1394 Minimum Inversion Number(线段树)
- UI019---ITableviewcell的性能问题和缓存优化