C++ to make coding about vote system thru file path

Help me, i dont know how to make the funcction for Duta. I already make the file path for the UNDIAN.DAT. HELP ME T.T

In the Felisa Beauty competition, three candidates namely A, B, and C have entered the final competition. Ambassador Felisa Beauty, the champion of the competition, is based on the highest marks obtained from SMS votes . Voting is done by typing the word Felisa and followed by the name of the selected candidate which is either A, B or C. Suppose all votes received will be stored in an input file named UNDIAN.DAT as shown in Figure 2 where each vote represents 1 mark. The total marks for all candidates will be calculated in the main program and then these three marks will be sent to a function named Duta to determine the Ambassador Felisa and the results will be sent back to the main program for printing. Assume that the number of votes for each candidate is different from each other.