so far i have written this but some how i think im doing it wrong if anyone could help thanks in advance.
cin.getline(players.name[SIZE];
cin.getline(players.name[index];
would work better ;)
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
>> double Points; //Point's Scored
why are you using double here? Can value of Points have a fractional part (I doubt it)? I think you would be better off using either int or long.
>> cin.getline(players.name[SIZE];
that should be like this:
cin.getline(players[i].name, SIZE);
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Yep, u need to use the index in your loop to make any sense of using it.. something like
for (index=0; index<NUM_PLAYERS; index++)
{
cout << "Name: " << players[index].name << endl;
cout << "Number: " << players[index].playNum << endl;
cout << "Score: " << players[index].Points << endl;
}
This way, each player's details are outputted starting from index 0 to the NUM_PLAYERS-1
may4life
Junior Poster in Training
57 posts since Oct 2006
Reputation Points: 13
Solved Threads: 2