Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. void __fastcall TForm1::Button1Click(TObject *Sender)
  2. {
  3. unsigned char j[2]={'f','ц'};
  4. for (int i = 1; i <= sizeof(j); i++) {
  5. int ko= static_cast<int>(static_cast<unsigned char>(j[i]));
  6. ListBox1->Items->Add(ko);
  7. }
  8.  
  9. }
  10. //---------------------------------------------------------------------------
  11. void __fastcall TForm1::Button2Click(TObject *Sender)
  12. {
  13. for (int i = 0; i < ListBox1->Items->Count; i++) {
  14. int kot=StrToInt(ListBox1->Items->Strings[i]);
  15. ListBox2->Items->Add(static_cast<char>(static_cast<unsigned char>(kot)));
  16. }
  17. }
  18. //---------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement