You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
864 B
C++
42 lines
864 B
C++
#include <vector>
|
|
#include <string>
|
|
#include <iostream>
|
|
|
|
#include "VectorSort.h"
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
|
|
vector<string> v;
|
|
|
|
string wants_more_input = "y";
|
|
string t_string;
|
|
while (wants_more_input == "y") {
|
|
cout << "Willst du eine (weitere) Zeichenkette hinzufügen? (y/n)";
|
|
cin >> wants_more_input;
|
|
if (wants_more_input == "y") {
|
|
cout << "Eingabe: ";
|
|
cin >> t_string;
|
|
v.push_back(t_string);
|
|
cout << endl;
|
|
} else
|
|
cout << endl;
|
|
}
|
|
|
|
if (v.size() == 0) {
|
|
cout << "Dann halt nicht..." << endl;
|
|
return 0;
|
|
}
|
|
|
|
VectorSort<string> v_sort(&v);
|
|
cout << "Vor der Sortierung: ";
|
|
v_sort.print();
|
|
v_sort.sort();
|
|
cout << endl << "Nach der Sortierung: ";
|
|
v_sort.print();
|
|
|
|
return 0;
|
|
}
|
|
|