I need some direction with the following program. It is called star search. When I try to run the program, I keep getting the following error message: 'sh: pause: command not found'. In addition to that the program won't read from the input and output files that I have created.
Below are the program instructions. If you do not care to read, please scroll down to see the code that I have created so far. Thanks.
Your program will have an input file that will consist of a list of contestants. The first line of the file is an integer that says how many contestants are in the file. Each line is for one contestant and each line in the file would have the following format (the name of the input file starsearch.dat):
Contestant Name(no spaces) score1 score2 score3 score4 score5
Your program will have a function called string contestantName() that takes the file object as a reference parameter and reads the file for the name of the contestant on the current line and returns the name. This function should be called from main, once for each line of the file.
The void getJudgeData() will read from the file and not from the user. This function will still use a reference parameter for the score, and it will read the next score from the file. This function will be called five times per contestant and is called from main once for each score.
The void CalcScore() is used to calculate the score using the same formulation. However, this function will write the contestants name and score to an output file. The function will have 7 parameters instead of 5: output file (pass by reference), contestants' name, and the 5 judges scores.
The output file will be a list of contestants, where each line has the following format (name the output file results.dat):
Contestant Name(name contains no spaces) Final_Score