I wrote this program which converts a time from 24 hour notation to 12 hour notation but I need to change it so it reads in the times one line at a time from a txt file and then converts those time. I only need to make a few changes but my function prototypes should look similar to this:
int gettime(ifstream& infile, int& hours, &int mins); // the int returned is a yes/no value indicating if EOF has occurred
char convert(int& hours);
void showresults(ofstream& outfile, int hours, int mins, char ampm, int orighours);
My current program is below, if anyone has any pointers for me I would really appreciate it.