Advertisement
Guest User

Untitled

a guest
Nov 11th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <limits>
  4. #include "sort1.h"
  5.  
  6. using namespace std;
  7. using namespace sort;
  8.  
  9. int main()
  10. {
  11. system("clear");
  12. int val;
  13.  
  14. while(true)
  15. {
  16. begin:
  17. cout << "Välj ett av alternativen:" << endl;
  18. cout << "1. Kolla om filen A1 är sorterad" << endl;
  19. cout << "2. Sortera fil A och B i ordning" << endl;
  20. cout << "3. Avsluta" << endl;
  21. cin >> val;
  22. system("clear");
  23.  
  24. while(cin.fail() or val > 3 or val < 1)
  25. {
  26.  
  27. cin.clear();
  28. cin.ignore(numeric_limits<streamsize>::max(), '\n');
  29. cout << "Ogilti inmatning, pröva igen" << endl << endl;
  30. goto begin;
  31. }
  32.  
  33. if(val == 1)
  34. {
  35. my_class sort;
  36. sort.sort1("A");
  37. }
  38. if(val == 2)
  39. {
  40. return 0;
  41.  
  42. }
  43. if(val == 3)
  44. {
  45. return 0;
  46. }
  47. }
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement