C++ Adding and Subtracting Time
<p>I am working on a program that asks the user to enter a time.(Assuming time is in 12 hour mode) The program also can ask the user if they want to add or subtract time from the original time they entered. </p>

<p>For example, </p>

<pre><code>void getTime(int &amp;h, int &amp;m, bool mode);
</code></pre>

<p>This would ask the user to enter an hour and minutes</p>

<p>such as h=7 and m=30 would display </p>

<pre><code>the time is 7:30 
</code></pre>

<p>I want to include another void function that allows a user to add or subtract time. If the user is displayed a menu, and the user selects add time, and enters </p>

<pre><code>h=2 m=30
</code></pre>

<p>The new time should display</p>

<pre><code>The new time is 10:00
</code></pre>

<p>I think I will need to include a while loop so that hours does not exceed 12 and minutes does not exceed 60, but I am confused on where to start.</p>