Iteratorlar va ularning qo‘llanilishi. Xotirani taqsimlovchilar va ularga


Download 144.96 Kb.
bet5/5
Sana16.03.2023
Hajmi144.96 Kb.
#1273133
1   2   3   4   5
Bog'liq
xotira

{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Memo1->Lines->Clear();
List* m = &First;
while(m)
{
Memo1->Lines->Add(m->Data);
m = m->next;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
Last = add(Last,Edit1->Text);
Edit1->Text = "";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
Last = del(Last);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button4Click(TObject *Sender)
{
while(Last != &First)
{
Last = del(Last);
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
First.next = 0;
First.prev = 0;
First.Data = "Ro‘yxatning boshi";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormDestroy(TObject *Sender)
{
Button4->Click();
}
Download 144.96 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling