Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AnsiString str = InputBox("Zadajte text, ktorĂ˝ chcete zasifrovat","text","");
- ofstream f;
- f.open("advanced-sifra.txt");
- AnsiChar c;
- Label3->Caption = "";
- for ( int i = 1; i <= str.Length(); i++ ) {
- c = str[i]+i+2;
- f.put(c);
- Label3->Caption=Label3->Caption + c;
- }
- f.close();
- ifstream l;
- l.open("advanced-sifra.txt");
- int i = 1;
- if (l.fail()) {
- ShowMessage("Chyba pri otvarani");
- } else {
- Label2->Caption = "";
- c = l.get() - i - 2;
- while ( l.good() ) {
- i++;
- Label2->Caption=Label2->Caption + c;
- c = l.get() - i - 2;
- }
- }
- l.close();
Advertisement
Add Comment
Please, Sign In to add comment