Beispiel #1
0
int main()
{

    unsigned key = 0;
    Align align;
    do
    {
      cout<<"1 - first task"<<endl;
      cout<<"2 - second task"<<endl;
      cout<<"3 - third task"<<endl;
      cout<<"4 - save data to file"<<endl;
      cout<<"5 - input the way to file"<<endl;
      cout<<"0 - exit"<<endl;
      cin>>key;
     switch (key)
     {
      case 1:
             align.CutAlign();
             break;
      case 2:
             align.LimitAlign();
             break;
      case 3:
             align.ByWidthAlign();
             break;
      case 4:
             align.Write();
             break;
      case 5:
             align.OpenFile();
             break;
      case 0:
             exit(EXIT_SUCCESS);
             break;
      default:
             cout<<"Incorrect command"<<endl;
      }
     cout.flush();
    } while (true);
    return 0;
}