title: How can I get program to display first and last initials as many times as user wants
body: <p>THIS WONT WORK it says terminate called
  after throwing an instance out of range</p>
  <p>char ans;</p>
  <p>do{
  cout&lt;&lt;&quot;Whats your full name\n&quot;;</p>
  <p>string fullname;</p>
  <pre><code>getline(cin,fullname);
  char first=fullname[0];
  int index=fullname.find(' ');
  char last=fullname.at(index+1);
  
  cout&lt;&lt;first&lt;&lt;&quot; &quot;&lt;&lt;last&lt;&lt;endl;
  cout&lt;&lt;&quot;wanna do it again? enter y\n&quot;;
  cin&gt;&gt;ans;
  }while(ans=='y');
  </code></pre>