最简单的结构体变量赋值都有错
#include <stdio.h>struct jgt
{
int a;
char b;
};
main()
{
struct jgt t1={1,"hello"};
printf("%d,%s",t1.a,t1.b);
return 0;
}
错误:[Error] C:\Users\syx\Documents\C-Free\Temp\未命名1.cpp:10: error: invalid conversion from `const char*' to `char'