带参构造函数为结构体对象数组赋值的方法
摘要:
struct student { char name[10]; int sore1,sore2,sore3; student(char a[10],int d,int b,int c) { strcpy(name,a); sore1=d; sore2=b; sore3=c; } }; int main(){ student stud[5]= { student("chenlan",85,78,76), ... 阅读全文
posted @ 2013-05-06 17:38 Bonke 阅读(1153) 评论(3) 推荐(0) 编辑