title: How To Print Values Stored in an Array
body: <p>I am working to create a function where I take in 6 values (3 strings, 3 ints), store those values in arrays, then print out each of those values in pairs of 2</p>
  
  <p>Here is what I have:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  using namespace std;
  
  int main()
  {
      const int SIZE = 3;
      int time[SIZE] = {};        
      string name[SIZE] = {};     
  
      for (int a = 0; a &lt; 3; a++)
      {
          cout &lt;&lt; "Enter runner name: ";
          getline (cin, name[+1]);        
          cout &lt;&lt; "Enter runner time: ";
          cin &gt;&gt; time[+1];
          cin.ignore();
      }
  
      for (int a = 0; a &lt; 3; a++)
      {
          cout &lt;&lt; name &lt;&lt; " finished in " &lt;&lt; time &lt;&lt; "\n";
      }
      return 0;
  }
  </code></pre>
  
  <p>I would like my output to look like this:</p>
  
  <pre><code>name1 finished in time1
  name2 finished in time2
  name3 finished in time3
  </code></pre>
  
  <p>Currently, my output looks like this:</p>
  
  <pre><code>0x22fdf0 finished in 0x22fe10
  0x22fdf0 finished in 0x22fe10
  0x22fdf0 finished in 0x22fe10
  </code></pre>
  
  <p>How can I get the inputs to be stored in the arrays then output those values to the user?</p>
  
  <p>If this has been answered already, apologies.  I haven't been able to find an example where the arrays are populated with user input values and then returned to the display.</p>