Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can someone please correct what I have so far. The current errors i recieve are:

ID: 661569 • Letter: C

Question

Can someone please correct what I have so far.

The current errors i recieve are:
Error 1 error C2059: syntax error : 'do' c:usersmicrocenterdesktopjimmyprogramming1course projectcourse projectproject.cpp 50 1 Course Project
4 IntelliSense: expected a declaration c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 50 1 Course Project
Error 2 error C2143: syntax error : missing ';' before '{' c:usersmicrocenterdesktopjimmyprogramming1course projectcourse projectproject.cpp 51 1 Course Project
Error 3 error C2447: '{' : missing function header (old-style formal list?) c:usersmicrocenterdesktopjimmyprogramming1course projectcourse projectproject.cpp 51 1 Course Project
5 IntelliSense: this declaration has no storage class or type specifier c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 104 6 Course Project
6 IntelliSense: expected a ';' c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 104 13 Course Project
7 IntelliSense: expected a declaration c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 105 5 Course Project
8 IntelliSense: this declaration has no storage class or type specifier c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 120 5 Course Project
9 IntelliSense: expected a ';' c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 120 10 Course Project
10 IntelliSense: identifier "row" is undefined c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 121 11 Course Project
11 IntelliSense: identifier "column" is undefined c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 121 16 Course Project
12 IntelliSense: expected a declaration c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 122 5 Course Project
13 IntelliSense: expected a declaration c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 123 3 Course Project
14 IntelliSense: expected a declaration c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 141 3 Course Project

  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99  100  101  102  103  104  105  106  107  108  109  110  111  112  113  114  115  116  117  118  119  120  121  122  123  124  125  126  127  128  129  130  131  132  133  134  135  136  137  138  139  140  141  142  143  144  145  
    #include <iostream>  #include <cctype>  #include <iomanip>  #include <fstream>  #include <cstring>  #include <cstdlib>   using namespace std;    //Declare function proto type  char menu;  char answer, seats;  int price1, price2, price3, runningTotal;  const int COLS = 8;  const int ROWS = 16;  void showArray(const int[][COLS], int);    int main()  {  int table1[ROWS][COLS] = {{'0', '1', '2', '3', '4', '5', '6'},                                                                   {'1', '0', '0', '0', '0', '0', '0'},                                                                   {'2', '0', '0', '0', '0', '0', '0'},                                                                   {'3', '0', '0', '0', '0', '0', '0'},                                                                  {'4', '0', '0', '0', '0', '0', '0'},                                                                  {'5', '0', '0', '0', '0', '0', '0'},                                                                  {'6', '0', '0', '0', '0', '0', '0'},                                                                  {'7', '0', '0', '0', '0', '0', '0'},                                                                  {'8', '0', '0', '0', '0', '0', '0'},                                                                  {'9', '0', '0', '0', '0', '0', '0'},                                                                  {'10', '0', '0', '0', '0', '0', '0'},                                                                  {'11', '0', '0', '0', '0', '0', '0'},                                                                  {'12', '0', '0', '0', '0', '0', '0'},                                                                  {'13', '0', '0', '0', '0', '0', '0'},                                                                  {'14', '0', '0', '0', '0', '0', '0'},                                                                  {'15', '0', '0', '0', '0', '0', '0'}};    ifstream infile;  int price1, price2, price3;    infile.open("SeatPrices.txt");    infile >> price1;  infile >> price2;  infile >> price3;    infile.close();    return 0;  }    do  {                  void showArray(table1, ROWS);                  cout << endl << "Menu" << endl << "(1)Reservation:" << endl << "(2)Display: " << endl << "(3)Quit: " << endl;                  cin >> answer;          while (answer < 1 || answer > 3)          {                  cout << "Invalid Choice, Please Select Again. ";                  cin >> answer;          }                                    if(answer == 1)          {                  cout << "Welcome to reservations" << endl << "Seats marked with # are available" << endl << "Seats marked with a * are taken " << endl;                            void showArray(table1[][COLS], int rows)                  {                          for (int x = 1; x < rows; x++)                          {                                  for (int y = 1; y < cols; y++)                                  {                                          cout << setw(7) << array[x][y] << " ";                                  }                          }                  }                  void available(table1[][COLS])                  {                          for (int i = 0; i < ROWS; i++)                                  for (int j = 0; j < COLS; j++)                                          seats[i][j];                  }                  char choose (int table1[][COLS])                  {                          int row, column, col;                          double firstClass = price1, firstFiveCoach = price2, lastFive = pric3;                                                      cout << endl << "enter Row 1-15: ";                          cin >> row;                            cout << endl << "Enter Seat 1-6: ";                          cin >> col;                          col = toupper(col);                          column = col                                    if(row < 1 && row > 15 && col < && row >1, row<6, col 1 > 5, col < 1)                                  {                                          cout << endl << "Invalid row!! " << endl;                          row--;                                  }                                                   if (row >=1 && row <= 5)                                  {                                          cout << endl << "Your first class ticket cost: " << price1 << endl;                                          price1 += runningTotal;                                  }                                                                    if (row >=6 && row <= 10)                                  {                                          cout << endl << "Your Coach class ticket cost: " << price2 << endl;                                          price2 += runningTotal;                                  }                                                                    if (row >=11 && row <= 15)                                  {                                          cout << endl << "Your Coach class ticket cost: " << price3 << endl;                                          price3 += runningTotal;                                  }                                    if (seats[row][column] == '*');                                  cout << endl << "this seat has been taken." << endl;                                  seats[row][column] = '*';                                  return seats['*'][COLS];                  }                                      if(answer == 2)                          void showArray(table1[][COLS], int rows)                  {                          for (int x = 1; x < rows; x++)                          {                                  for (int y = 1; y < cols; y++)                                  {                                          cout << setw(7) << array[x][y] << " ";                                    cout >> endl >> "The Total cost of the seats is: " >> runningTotal >> endl;                                  }                          }                  }                  if(answer == 3)                          return 0;                  }  }  

The current errors i recieve are:
Error 1 error C2059: syntax error : 'do' c:usersmicrocenterdesktopjimmyprogramming1course projectcourse projectproject.cpp 50 1 Course Project
4 IntelliSense: expected a declaration c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 50 1 Course Project
Error 2 error C2143: syntax error : missing ';' before '{' c:usersmicrocenterdesktopjimmyprogramming1course projectcourse projectproject.cpp 51 1 Course Project
Error 3 error C2447: '{' : missing function header (old-style formal list?) c:usersmicrocenterdesktopjimmyprogramming1course projectcourse projectproject.cpp 51 1 Course Project
5 IntelliSense: this declaration has no storage class or type specifier c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 104 6 Course Project
6 IntelliSense: expected a ';' c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 104 13 Course Project
7 IntelliSense: expected a declaration c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 105 5 Course Project
8 IntelliSense: this declaration has no storage class or type specifier c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 120 5 Course Project
9 IntelliSense: expected a ';' c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 120 10 Course Project
10 IntelliSense: identifier "row" is undefined c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 121 11 Course Project
11 IntelliSense: identifier "column" is undefined c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 121 16 Course Project
12 IntelliSense: expected a declaration c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 122 5 Course Project
13 IntelliSense: expected a declaration c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 123 3 Course Project
14 IntelliSense: expected a declaration c:UsersmicrocenterDesktopJimmyProgramming1Course ProjectCourse ProjectProject.cpp 141 3 Course Project

Explanation / Answer

the syntax of your do statement is not correct that is why it is showing first error in line 59 as it is expecting syntax like this -

int main ()

After using this syntax half erros will be automaticlaay less.

2. In line 93 insert ; in the end -- column = col;

3. Line 95 is not correct and i could not understand your requirement - Advise

dont use ',' inside .. use && for and || for or like - if((a&&b)&&(B||C))

4. line 119 - dont use ';' after if statement.