刚刚学到数据结构,写的一段代码通不过。。。
#include <iostream>struct super
{
char name[20];
float b;
double c;
}
int main()
{
using namespace std;
super hong =
{
"ahong",
55.5,
44.4
};
super san =
{
"asan",
11.1,
22.2
};
cout<<"hong:"<<hong.name<<"$";
cout<<hong.c<<endl;
san=hong;
cout<<"a san:"<<san.name<<"$";
cout<<san.c<<endl;
system ("pause");
return 0;
}