Add the Prototype, a call and the definition for a printAllPlayers() function that prints to STDOUT (using cout) each players name and all of their at-bat stats. Only print out the values of the stats array up to timesAtBat.
#include
using namespace std;
const int MAX_AT_BAT = 10000;
const int NUM_PLAYERS = 11;
struct AtBatStats{
int hits;
int strikes;
};
struct BaseballPlayer{
string name;
int timesAtBat;
AtBatStats stats[ MAX_AT_BAT];
};
int main(){
BaseballPlayer rooster[NUM_PLAYERS];
// Assume player info is loaded from a file into rooster
return 0;
}