title: How to do theatre seat reservation in C++?
body: <p>I'm a beginner in C++ and still learning. My teacher has assigned me a project and I'm trying to create a cinema's software. I'm done with the basic options and the menus. Now I'm stuck at the seat reservation. I managed to create a simple reservation system using array's which X's the seat that the user wants to book. It also displays an error if it is being booked again or an invalid seat is selected that does not exist. Now I don't know how to display the specific seat number like "A1" "C3"?</p>
  
  <p>I'm just a beginner and I'm going to use a specific separate function in my project but the code I'm posting here is itself the main function.</p>
  
  <p>Thank You! PS: I know my code isn't as efficient as it needs to be but I made this only while practicing for the real program...</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;Windows.h&gt;
  using namespace std;
  int main()
  {
      choose:
      string seat[]={"x1","y1","x2","y2","x3","y3","x4","y4","x5","y5","x6","y6","x7","y7","x8","y8","x9","y9","x10","y10","x11","y11","x12","y12","x13","y13","x14","y14","x15","y15","x16","y16","x17","y17","x18","y18","x19","y19","x20","y20","x21","y21","x22","y22","x23","y23","x24","y24","x25","y25","x26","y26","x27","y27","x28","y28","x29","y29","x30","y30","x31","y31","x32","y32","x33","y33","x34","y34","x35","y35","x36","y36"};
      int row,col;
      int input;
      char rows='1';
      char c;
      char book1;
      string arr[4][9]={{"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"},{"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"},
      {"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"},{"[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]","[ ]"}};
      cout&lt;&lt;"\t\t            1   2   3   4   5   6   7   8   9"&lt;&lt;endl;
      for(int i=0; i&lt;4; ++i)
      {
          cout&lt;&lt;"\t\t   Row "&lt;&lt;rows&lt;&lt;":  ";
          ++rows;
          for(int j=0; j&lt;9; ++j)
              cout&lt;&lt;arr[i][j]&lt;&lt;" ";
          cout&lt;&lt;endl;
      }
  
      again:
      rows='1';
      for(input=1; input&lt;37; input=input+2)
      {
          rows='1';
          cout&lt;&lt;endl&lt;&lt;"\t\t               Enter Row &amp; Column: ";
          cin&gt;&gt;row&gt;&gt;col;
          if (row&lt;=0 || col&lt;=0)
          {
              cout&lt;&lt;endl&lt;&lt;"\t\t              Please Pick A Valid Seat"&lt;&lt;endl;
              Sleep(500);
              system("cls");
              goto choose;
          }
          --row;
          --col;
          if(arr[row][col]=="[X]")
          {
              cout&lt;&lt;endl&lt;&lt;"\t\t             Seat Not Available"&lt;&lt;endl;
              goto again;
          }
          arr[input][input+1]=arr[row][col];
          arr[row][col]="[X]";
          system("cls");
          cout&lt;&lt;endl;
          cout&lt;&lt;"\t\t            1   2   3   4   5   6   7   8   9"&lt;&lt;endl;
          for(int i=0; i&lt;4; ++i)
          {
              cout&lt;&lt;"\t\t   Row "&lt;&lt;rows&lt;&lt;":  ";
              ++rows;
              for(int j=0; j&lt;9; ++j)
                 cout&lt;&lt;arr[i][j]&lt;&lt;" ";
              cout&lt;&lt;endl;
          }
          cout&lt;&lt;endl&lt;&lt;"\t\t                   Seat Booked!"&lt;&lt;endl;
          cout&lt;&lt;endl&lt;&lt;"\t\t        Do You Want To Book Another Seat?"&lt;&lt;endl;
          cout&lt;&lt;"\t\t          Press [Y] For Yes &amp; [N] For No."&lt;&lt;endl;
          cout&lt;&lt;"\t\t                        ";
  
          cin&gt;&gt;c;
          if(c=='y' || c=='Y')
              continue;
          else if(c=='n' || c=='N')
          // Here I want the code to print seat number as A1 or C3 etc...
          break;
      }
  }
  </code></pre>