fork(1) download
  1.  
  2. #include <iostream>
  3. #include <cstring> // Needed for NULL
  4. #include "List.h"
  5. using namespace std;
  6. int main()
  7. {
  8. List lst;
  9. int choice, val;
  10. cout << "enter the list values\n";
  11. cin >> lst;
  12. cout << "choose 0-2\n";
  13. cin >> choice;
  14. while (choice)
  15. {
  16. switch (choice)
  17. {
  18. case 1:cout << "enter a value to insert\n";
  19. cin >> val;
  20. lst.insert(val);
  21. break;
  22. case 2:cout << "enter a value to remove\n";
  23. cin >> val;
  24. try{
  25. lst.remove(val);
  26. }
  27. catch (char * msg)
  28. {
  29. cout << msg << endl;
  30. }
  31. break;
  32. default:cout << "ERROR\n";
  33. }
  34. cout << lst << endl;
  35. cout << "choose 0-2\n";
  36. cin >> choice;
  37. }
  38. return 0;
  39. }
  40.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:18: fatal error: List.h: No such file or directory
 #include "List.h"
                  ^
compilation terminated.
stdout
Standard output is empty