title: Function struct array input cin problems
body: <p>I can't figure out how to fix this code. </p>
  
  <pre><code>void getInfo(Author a[], int size)
  {
      for(int x = 0; x &lt; size; x++)
          {
              cout &lt;&lt; "Enter the author's name: ";
              getline(cin, a[x].name);
  
              if(a[x].name == "NONE")
                  break; //Breaks the loop if the author has no further books
              else
  
              for(int y = 0; y &lt; size; y++)
                  {
                      cout &lt;&lt; "Enter title " &lt;&lt; y+1 &lt;&lt; " :";
                      getline(cin, a[x].book[y].title);
  
                      if(a[x].book[y].title == "NONE")
                          break;
                      else
                          cout &lt;&lt; "Enter price " &lt;&lt; y+1 &lt;&lt; " :  $"; 
                          cin &gt;&gt; a[x].book[y].price;
                  }
              cout &lt;&lt; endl;
          }
  }
  </code></pre>
  
  <p>This is how it is compiling: </p>
  
  <pre><code>Get user's input:
  Enter the author's name: John Smith
  Enter title 1: How to Tie a Shoe
  Enter price 1: 20
  Enter title 2: Enter price 2: 
  </code></pre>
  
  <p>Could someone please help me understand how to fix this loop. When I try a <code>getline(cin, a[x].book[y].price);</code> ,visual studio tells me that it is overloaded. </p>