C++帮忙找错

来源:百度知道 编辑:UC知道 时间:2024/06/14 12:38:03
我是新手,初学C++,用Visual C++ 6.0编了一段代码,调试没出现错误,但是死活运行不出来,老出来一个错误提示。
我编的代码如下:
#include<iostream.h>
#include<stdlib.h>
#include<iomanip.h>
#include<math.h>

struct Name
{
char FirstName[20];
char SecondName[20];
};

struct PlayerDate
{
float Height_Feet,Height_Inch,Weight;
};

struct FootballPlayer
{
Name MyPlayer;
PlayerDate TheDate;
};

FootballPlayer PlayerAverages(FootballPlayer);
void WritePlayer(FootballPlayer,FootballPlayer);

int main()
{
FootballPlayer a[3][20],Average;
int i;
for(i=0;i<3;i++)
{
cout<<"请输入第"<<i+1<<"个人的名字";
cin.getline(a[0][20].MyPlayer.FirstName,20);
cin.getline(a[0][20].MyPlayer.SecondName,20);
cout<<"请输入第"<<i+1<<"个人的身高";
cin>>a[0][20].TheDate.Height_Feet>&

#include<iostream.h>
#include<stdlib.h>
#include<iomanip.h>
#include<math.h>

struct Name
{
char FirstName[20];
char SecondName[20];
};

struct PlayerDate
{
float Height_Feet,Height_Inch,Weight;
};

struct FootballPlayer
{
Name MyPlayer;
PlayerDate TheDate;
};

FootballPlayer* PlayerAverages(FootballPlayer b[3][20]);
void WritePlayer(FootballPlayer,FootballPlayer);

int main()
{
FootballPlayer a[3][20],*Average;
int i;
for(i=0;i<3;i++)
{
cout<<"请输入第"<<i+1<<"个人的名字";
cin.getline(a[0][20].MyPlayer.FirstName,20);
cin.getline(a[0][20].MyPlayer.SecondName,20);
cout<<"请输入第"<<i+1<<"个人的身高";
cin>>a[0][20].TheDate.Height_Feet>>a[0][20].TheDate.Height_Inch;
cout<<"