首页上一页 1 下一页尾页 1 条记录 1/1页
编译不成功,不知道哪的问题
发表在C++图书答疑
2017-05-29
是否精华
是
否
版块置顶:
是
否
#include<iostream>
using namespace std;
int main()
{
struct Personlnfo
{
int index;
char name[30];
short age;
struct WorkPlace
{
char Address[150];
char PostCode[30];
char GateCode[50];
char Street[100];
char Area[50];
}wp;
}
};
Personlnfo plnfo;
strcpy(plnfo.wp.Address,"House");
strcpy(plnfo.wp.PostCode,"10000");
strcpy(plnfo.wp.GateCode,"302");
strcpy(plnfo.wp.Street,"Lan Tian");
strcpy(plnfo.wp.Area,"china");
cout<<plnfo.wp.Address<<endl;
cout<<plnfo.wp.PostCode<<endl;
cout<<plnfo.wp.GateCode<<endl;
cout<<plnfo.wp.Street<<endl;
cout<<plnfo.wp.Area<<endl;
}