结构体 -转
摘要:【C&C++】结构体作用笔记一. 结构作为函数的参数用结构作为参数有四种情形:1. 直接用它本身2. 用结构成员3. 用结构地址4. 用数组1.结构作为参数struct book{ float cost; int series;};float fcost(struct book item1,struct book item2){ if (item1.series!=item2.series) return(item1.cost+item2.cost); else return(item1.cost);}#include "stdio.h"main(){ struct
阅读全文
posted @ 2013-07-22 16:14
浙公网安备 33010602011771号