// My C++.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "PlayerInfo.h"
#include <vector>
#include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
using namespace Player;
struct Peopel
{
string name;
int age;
Peopel* pNext;
};
int _tmain(int argc, _TCHAR* argv[])
{
Peopel MyPeopel[3] = { {"申苏斌",20,0},{"于欢",21,0},{"丁东方",22,0}};
Peopel* pHead = &MyPeopel[0];
MyPeopel[0].pNext = &MyPeopel[1];
MyPeopel[1].pNext = &MyPeopel[2];
MyPeopel[2].pNext = 0;
while ( pHead)
{
cout<<"我叫"<< pHead->name <<"今年" << pHead->age<<"岁了"<<endl;
pHead = pHead->pNext;
}
system("pause");
return 0;
}
//
#include "stdafx.h"
#include "PlayerInfo.h"
#include <vector>
#include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
using namespace Player;
struct Peopel
{
string name;
int age;
Peopel* pNext;
};
int _tmain(int argc, _TCHAR* argv[])
{
Peopel MyPeopel[3] = { {"申苏斌",20,0},{"于欢",21,0},{"丁东方",22,0}};
Peopel* pHead = &MyPeopel[0];
MyPeopel[0].pNext = &MyPeopel[1];
MyPeopel[1].pNext = &MyPeopel[2];
MyPeopel[2].pNext = 0;
while ( pHead)
{
cout<<"我叫"<< pHead->name <<"今年" << pHead->age<<"岁了"<<endl;
pHead = pHead->pNext;
}
system("pause");
return 0;
}