2015年5月18日

结构体与指针

摘要: 1 #include 2 #include 3 #include 4 5 struct data 6 { 7 int num; 8 }; 9 void main()10 {11 struct data(*p)[10] = malloc(sizeof(struct data) * ... 阅读全文

posted @ 2015-05-18 22:24 Dragon-wuxl 阅读(126) 评论(0) 推荐(0)

结构体和结构体副本机制

摘要: 1 #include 2 #include 3 4 struct MyStruct 5 { 6 int a[10]; 7 int length; 8 }; 9 10 void change(struct MyStruct s1)//副本机制,对于结构体生效(结... 阅读全文

posted @ 2015-05-18 21:28 Dragon-wuxl 阅读(311) 评论(0) 推荐(0)

结构体大小

摘要: 1 #include 2 #include 3 4 /* 5 6 结构体大小大于等于所有成员的大小之和 7 char int double float //基本类型 double最宽基本成员 8 结构体的大小必须可以整除最宽基本成员 9 结构体成员的地址... 阅读全文

posted @ 2015-05-18 13:10 Dragon-wuxl 阅读(128) 评论(0) 推荐(0)

结构体动态数组,结构体与指针

摘要: 1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 #include 6 7 8 struct csdn 9 {10 int id;11 int num;12 };13 14 void mai... 阅读全文

posted @ 2015-05-18 10:15 Dragon-wuxl 阅读(417) 评论(0) 推荐(0)

导航