//结构体的测试
// CTest.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
using namespace std;
struct person{
char name[15];
char sex;
int age;
}m[3]={{"FangMin",'F',24},{"LiLin",'M',23},{"WuBin",'M',23}};
int _tmain(int argc, _TCHAR* argv[])
{
person *p = m;
cout<<"姓名 "<<"\t"<<"性别"<<"\t"<<"年龄"<<endl;
for(;p<m+3;p++){
cout<<p->name<<"\t"<<p->sex<<"\t"<<p->age<<endl;
}
cout<<"hello world"<<endl;
system("pause");
return 0;
}