Better way to repeatedly use istringstream in "counting minutes" challenge
In to24HourTime(), pos doesn't need to be passed by reference as it's not being modified.  Just pass it by value.

Instead of passing hourToConvert by reference (which is being modified), you can just pass by value and then return the result.  It may also increase readability as it'll be clear that the third argument is to be reassigned by the function.

Final changes:

hour1int = to24HourTime(str, stringPos, hour1int);

// ...

int to24HourTime(string timeString, int pos, int hourToConvert) {
    if (timeString[pos] == 'p' &amp;&amp; hourToConvert != 12)
        hourToConvert += 12;
    if (timeString[pos] == 'a' &amp;&amp; hourToConvert == 12)
        hourToConvert = 0;

    return hourToConvert;
}