VC++改错,帮忙改改那里错误,#includestruct{int a,b,c;}s1,s2;struct s{int a,b,c;}s3,s4;void main(void){ cin>>s1>>s2;s3=s1;s4=s2;cout

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/06 05:51:04
VC++改错,帮忙改改那里错误,#includestruct{inta,b,c;}s1,s2;structs{inta,b,c;}s3,s4;voidmain(void){cin>>s1>>s2;s3

VC++改错,帮忙改改那里错误,#includestruct{int a,b,c;}s1,s2;struct s{int a,b,c;}s3,s4;void main(void){ cin>>s1>>s2;s3=s1;s4=s2;cout
VC++改错,帮忙改改那里错误,
#include
struct{
int a,b,c;
}s1,s2;
struct s{
int a,b,c;
}s3,s4;
void main(void)
{ cin>>s1>>s2;
s3=s1;s4=s2;
cout

VC++改错,帮忙改改那里错误,#includestruct{int a,b,c;}s1,s2;struct s{int a,b,c;}s3,s4;void main(void){ cin>>s1>>s2;s3=s1;s4=s2;cout
结构体变量的定义和赋值首先要知道:
struct
{}s;
s s1,s2,s3,s4;//定义
void main()
{
cin>>s1.a>>s2.a;
//也就是赋值分别必须对结构体中的元素赋值
cout