Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include "sorterhelper.h"
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. cout << endl;
  9. //seeds random numbers
  10. srand(time(NULL));
  11.  
  12. //my testing data- size from 1-20
  13. vector<int>myVector;
  14. int a = (rand() % 10) + 1; //1 to 20
  15.  
  16. cout << "UNSORTED DATA: " << endl;
  17. //pushes back a ran num from 1-20
  18. for (int i =0; i < a; i++)
  19. {
  20. int b = (rand() % 1000) + 1; //1 to 20
  21. myVector.push_back(b);
  22. cout << "index " << i << ": " << myVector[i] << endl;
  23. }
  24. cout << endl;
  25.  
  26. SorterHelper * mySorting = new SorterHelper();
  27.  
  28. (*mySorting).MysteryClassA(myVector);
  29. printMyVector(myVector);
  30.  
  31. //(*mySorting).MysteryClassB(myVector);
  32. //printMyVector(myVector);
  33.  
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement