Write a C++ program that processes the data of a retail company with following requirements:
Define a new data type (struct) ofCustomer, with following members:
ID, first name, last name, number of items purchased, price of a single item, and total spending.
In themain function, declare an array ofCustomer.
The array should be created dynamically. In other words, you do not know how many customers
when you write the program. The program can asks a user to enter a number, or better yet, let the code to count the number of records in the file.
Themain function reads the data from a file of "customers.dat".
Each row represents a customer's record, with ID, first name, last name, number of item purchased and the price of a single item.
The data columns are separated by white spaces.
Store the customer data in the array.
Design a function,computeTotals, to calculate the total spending of each customer:
total = numItems * price.
computeTotals takes two parameters, the array and the number of customers.
computeTotals must be implemented with pointer notation (3-point deduction for using non-pointer notations).
In themain function, print out all records, including the total spending, such as:
1001 Scott Adams 3 22.86 68.58
1002 Nicholas Allen 8 10.00 80.00.