title: Compare two arrays C++
body: <p>I'm trying to create a function that uses dynamic allocated arrays instead of vectors because I want to see how they work. Basically, this function asks the user to input how many people they are going to enter followed by their name; then, they enter how many of these people want to register for an ID followed by their phone #. </p>
  
  <p>For example:</p>
  
  <pre><code>"How many customers will you like to enter? " 3 //user inputs 3
  Bob Allen //user input
  Ellen Michaels //user input
  Jane Andrews //user input
  
  "How many people want to register for the VIP ID? " 4 //user inputs 4; user can enter a new name here if they forgot to enter it the first time
  Jane Andrews 213-2312
  Bob Allen 111-1212
  Jonathan Drew 211-9283
  Michael Jacks 912-3911
  
  //what the program spits out after the function is implemented
  Final Registration: Guaranteed VIP IDs 
  Bob Allen 111-1212
  Ellen Michaels NOT GUARANTEED
  Jane Andrews 213-2312
  
  //The new users entered in the 2nd round will not be listed in the final registration because it is too late for them to sign up
  </code></pre>
  
  <p>Basically, the problem I'm having is:</p>
  
  <pre><code>1. How to check if the person is not listed in the second round
  2. Ignore the new people the user entered in the second round
  3. Print the final registration in the same order the user entered the names in the first round
  </code></pre>
  
  <p>This is what I have right now, but this only works if the same number of users is entered the first and second time around. It does not check if there are new or omitted </p>
  
  <pre><code>string* people;
  cout &lt;&lt; "How many customers will you like to enter? " &lt;&lt; endl;
  int howmany;
  cin &gt;&gt; howmany;
  people = new int[howmany];
  
  for (int i=0;i&lt;howmany;i++)
  {
      cin &gt;&gt; people[i];
  }
  
  cout &lt;&lt; "How many people want to register for the VIP ID? " &lt;&lt; endl;
  int num_of_register;
  string* vip;
  cin &gt;&gt; num_of_register;
  vip = new int[num_of_register];
  
  for (int i=0;i&lt;num_of_register)
  {
      cin &gt;&gt; vip[i];
      for (int j=0;j&lt;howmany;j++)
      {
          if (num_of_register == howmany) {
              if people[j] == vip[i] //check if they're the same people or not
                    cout &lt;&lt; "Final Registration: Guaranteed VIP Ids" &lt;&lt; endl;
                    cout &lt;&lt; people[i]; 
          else {
              //check if the names are the same
          }
       }
  }
  </code></pre>
  
  <p>Any guide/advice will be helpful. I'm not sure how to approach this problem. Thank you!</p>