Write the following non-member functions:
readFile that receives an array of Cars and the maximum number of cars that can be
read into the array, and will read the car information stored in Question 1 in file car.txt
and set the objects in the Car array to these values. Ensure that you do not go past the
boundary of the array. This function will return the updated Car array and the number
of cars that were entered.
The answer to your question is provided in the image:
Comments
Leave a comment