Quellcode
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- int main(int argc, char *argv[])
- {
- char charsetchars[100];
- char entering[100];
- unsigned short int enter;
- while (true)
- {
- cout << "+---+------------------------------------+" << endl;
- cout << "| 0 | Quit |" << endl;
- cout << "+---+------------------------------------+" << endl;
- cout << "| 1 | Enter Charset |" << endl;
- cout << "+---+------------------------------------+" << endl;
- cin >> enter;
- switch (enter)
- {
- case 1:
- cout << "enter the characters which shall be contained in the charset" << endl;
- cout << "enter 'exit' to go back to the menu" << endl;
- cin.getline(entering, sizeof(entering) / sizeof(char));
- if (strcmp(entering, "exit")) continue;
- strcpy(charsetchars, entering);
- cout << "Neuer Zeichensatz übernommen" << endl;
- break;
- default: break;
- }
- }
- return 0;
- }
[Blockierte Grafik: http://scriptjunkies.bplaced.net/problem.png]