//运行中不能改变
#include <iostream>
using namespace std;
struct student{
int id;
char *name;
}stu[10];
void main()
{
stu[1].id=123;
stu[1].name="qwe";
//scanf("%d %s",&stu[1].id,&stu[1].name);
printf("%d %s\n",stu[1].id,stu[1].name);
}
字符数组char *s; 不能scanf输入,运行中不能赋值
猜你喜欢
转载自blog.csdn.net/yky__xukai/article/details/102846948
今日推荐
周排行