作者在 2011-05-27 12:07:37 发布以下内容
#include <stdio.h>
struct stu
{
char name[10];
int num;
};
void f( struct stu* c )
{
struct stu b={ "LiSiGuo", 2042 };
*c = b;
}
void main()
{
struct stu a={"YangSan",2041}, b={"WangYin",2043};
f( &b );
printf("%d %d\n",a.num,b.num);
}
struct stu
{
char name[10];
int num;
};
void f( struct stu* c )
{
struct stu b={ "LiSiGuo", 2042 };
*c = b;
}
void main()
{
struct stu a={"YangSan",2041}, b={"WangYin",2043};
f( &b );
printf("%d %d\n",a.num,b.num);
}