title: Why it stops and finished with exit code 11?
body: <p>I don't know why it stops there and finished with exit code 11. It suppose to run until I give the command.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;fstream&gt;
  using namespace std;
  
  
  void record(string name, string phoneNum, int count);
  
  // main
  int main() {
      cout &lt;&lt; " Welcome to use the Phone Contact Systerm " &lt;&lt; endl;
      string name;
      string phoneNum;
      int count = 0;
      string signToStop;
      cout &lt;&lt; " Please enter name and phone number " &lt;&lt; endl;
      while ( cin &gt;&gt; name &gt;&gt; phoneNum){
          cout &lt;&lt; " If you want to start the program, enter start "         &lt;&lt; endl;
          cout &lt;&lt; " If you want to quit the program, enter quit " &lt;&lt;     endl;
          cin &gt;&gt; signToStop;
          if (signToStop == "start"){
              record(name, phoneNum, count);
              cout &lt;&lt; " Please enter name and phone number " &lt;&lt; endl;
          }
          else if ( signToStop == "quit" ){
              break;
          }
          cout &lt;&lt; count &lt;&lt; endl;
          count++;
  
  
      }
  }
  
  // record all name info into Name set and record all phone numbers         into PhoneNum set
  void record(string name, string phoneNum, int count){
      string Name[] = {};
      string PhoneNum[] = {};
      Name[count] = {name};
      PhoneNum[count] = {phoneNum};
  
      // now start to record all the info into .txt document
  
      ofstream phoneFile;
      phoneFile.open("contact.txt");
      phoneFile &lt;&lt; name &lt;&lt; "  " &lt;&lt; phoneNum &lt;&lt; endl;
  }
  </code></pre>
  
  <p>Result is:</p>
  
  <pre><code> Welcome to use the Phone Contact Systerm 
  
   Please enter name and phone number 
  
  Molly 5307609829
  
   If you want to start the program, enter start 
  
   If you want to quit the program, enter quit 
  
  start
  
   Please enter name and phone number 
  
  0
  
  Lilyi 44080809829
  
   If you want to start the program, enter start 
  
   If you want to quit the program, enter quit 
  
  start
  
  Process finished with exit code 11
  </code></pre>