fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. const int ROWS = 13;
  8. const int SEATS = 6
  9. string Ticket [3] = { "first class", "business class", "economy class" };
  10.  
  11.  
  12. cout << "what is the ticket type?";
  13. cin << ticket;
  14.  
  15. cout << "What is your desired row?";
  16. cin << row
  17.  
  18. cout << " what is your desired seat?"
  19. cout << seat
  20.  
  21. if (ticket > ) {
  22.  
  23. } else {
  24. << "Not found." << endl;
  25. }
  26.  
  27. return 0;
  28. }
Compilation error #stdin compilation error #stdout 0.01s 5272KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:9:2: error: expected ‘,’ or ‘;’ before ‘string’
  string Ticket [3] = { "first class", "business class", "economy class" };
  ^~~~~~
prog.cpp:13:9: error: ‘ticket’ was not declared in this scope
  cin << ticket;
         ^~~~~~
prog.cpp:13:9: note: suggested alternative: ‘tzset’
  cin << ticket;
         ^~~~~~
         tzset
prog.cpp:16:9: error: ‘row’ was not declared in this scope
  cin << row
         ^~~
prog.cpp:23:7: error: ‘else’ without a previous ‘if’
     } else {
       ^~~~
prog.cpp:24:9: error: ‘outFile’ was not declared in this scope
         outFile << "Not found." << endl;
         ^~~~~~~
prog.cpp:24:9: note: suggested alternative: ‘mutable’
         outFile << "Not found." << endl;
         ^~~~~~~
         mutable
stdout
Standard output is empty