Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <limits>
- #include "sort1.h"
- using namespace std;
- using namespace sort;
- int main()
- {
- system("clear");
- int val;
- while(true)
- {
- begin:
- cout << "Välj ett av alternativen:" << endl;
- cout << "1. Kolla om filen A1 är sorterad" << endl;
- cout << "2. Sortera fil A och B i ordning" << endl;
- cout << "3. Avsluta" << endl;
- cin >> val;
- system("clear");
- while(cin.fail() or val > 3 or val < 1)
- {
- cin.clear();
- cin.ignore(numeric_limits<streamsize>::max(), '\n');
- cout << "Ogilti inmatning, pröva igen" << endl << endl;
- goto begin;
- }
- if(val == 1)
- {
- my_class sort;
- sort.sort1("A");
- }
- if(val == 2)
- {
- return 0;
- }
- if(val == 3)
- {
- return 0;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement