Skip to content
Browse files

Testing

  • Loading branch information...
1 parent 90427c9 commit 09503793e0ecaef4639c6d32681a0b561e4ad620 @option0417 committed Jan 16, 2012
Showing with 14 additions and 24 deletions.
  1. +14 −24 src/main.cpp
View
38 src/main.cpp
@@ -18,36 +18,26 @@ void single99();
void double99();
int main(void) {
-// int size = 0;
-// std::cout<<"Size of Vector : ";
-// std::cin>>size;
-//
-// RandomVector randomVector(size);
-// randomVector.show();
-//
-// int* vals = &(*randomVector.getVector())[0];
-// std::cout<<vals<<" ";
-// std::cout<<&randomVector.getVector()->at(0)<<" ";
-// std::cout<<std::endl;
-// std::cout<<*vals<<" ";
-// std::cout<<randomVector.getVector()->at(0)<<" ";
+ int size = 0;
+ std::cout<<"Size of Vector : ";
+ std::cin>>size;
+
+ RandomVector randomVector(size);
+ randomVector.show();
+
+ int* vals = &(*randomVector.getVector())[0];
+
//InsertSort* sort1 = new InsertSort(randomVector.getVector().data(), size);
- //IAlgorithm* sort2 = new SelectionSort(vals, size);
+ IAlgorithm* sort2 = new SelectionSort(vals, size);
//IAlgorithm* sort3 = new BubbleSort(randomVector.getVector().data(), size));
//sort1->sort();
- //sort2->sort();
+ sort2->sort();
//sort3->sort();
- //for (int i = 0; i < size; i++) {
- // std::cout<<vals[i]<<" ";
- // //vals++;
- //}std::cout<<std::endl;
- //randomVector.show();
- //sort->show();
-
- MongoSample mongo;
- mongo.run();
+ for (int i = 0; i < size; i++) {
+ std::cout<<vals[i]<<" ";
+ }std::cout<<std::endl;
return 0;
}

0 comments on commit 0950379

Please sign in to comment.
Something went wrong with that request. Please try again.