Question: Create a C++ program that collects data from the input file and puts it into the array, then displays it. --------------------------Main.cpp--------------------- #include #include #include #include
Create a C++ program that collects data from the input file and puts it into the array, then displays it.
--------------------------Main.cpp---------------------
#include
#include
#include
#include "library.h"
using namespace std;
int main() {
const unsigned SIZE = 50;
Game games[SIZE];
unsigned num_games = 0;
//collect data and abort the program
}
}
---------------------library.cpp---------------
#include
#include
#include
#include "library.h"
using namespace std;
bool collect(Game a[], unsigned& n) {
}
void print(const Game a[], unsigned n) {
}
----------------library.h-----------
#include
using namespace std;
struct Player {
string name;
unsigned price;
unsigned amount;
};
bool collect(Game a [], unsigned& n);
void print(const Game a[], unsigned n);
------------- games.txt-------
Halo,$50,5
COD,$75,1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
