title: Convert milliseconds to hours:minutes:seconds:milliseconds in C++
body: <p>I'm looking for a way to print out milliseconds in this format using C++:</p>
  
  <pre><code>cout &lt;&lt; hours &lt;&lt; " Hours : " &lt;&lt; minutes &lt;&lt; " Minutes : " &lt;&lt; seconds &lt;&lt; " Seconds : " &lt;&lt; milliseconds &lt;&lt; " Milliseconds" &lt;&lt; endl;
  </code></pre>
  
  <p>I know there are a ton of duplicate questions about this.  But none of them really handle how to get the remainder in milliseconds.  There are a few that do this using Java, but I want a solution in C++.</p>
  
  <p>Edit:</p>
  
  <p>I wanted to clarify the question.  I'm looking to take a time value that I get for the time it takes a program to run and print out that time in a legible format for the user.  Getting the standard hr:min:sec was straight forward.  But including any remaining milliseconds was tripping me up.</p>