Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while( true )
- {
- char opcje2;
- do
- {
- cout <<endl<<endl;
- cout << "Czy chcesz cos dopisac?"<<endl;
- cout <<"[1] Tak / [2] NIE\n" <<endl;
- opcje2 = getch();
- switch(opcje2)
- {
- case '1':
- {
- outfile.open (str.c_str(), ios::app);
- cout << "\nPodaj tekst ktory ma byc dopisany:\n";
- cin.sync(); // czysci bufor strumienia wejsciowego
- getline(cin, textToAdd);
- for(i=0; i<textToAdd.length(); i++)
- {
- outfile << textToAdd[i];
- }
- outfile.close();
- break;
- }
- case '2':
- {
- showMenu();
- break;
- }
- }
- }
- while(opcje2 != '2');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement