C语言:形参和实参不符
#include<stdio.h>
#include<string.h>
struct contact {
char phone[20];
char email[20];
};
struct person_plus {
char name[20];
char gender[20];
double height;
double weight;
};
void change(struct person_plus* per)
{
strcpy((*per).name, "David");
//per->name = "David";
strcpy((*per).gender, "man");
//per->gender = "man";
(*per).height = 176;
(*per).weight = 118;
//(*per).a.email = "None";
}
int main()
{
struct person_plus {
char name[20];
char gender[20];
double height;
double weight;
};
struct person_plus Uimmy = { "Uimmy","man",170,100};
change(&Uimmy);
}
![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/61264281906616.png "#lef