void __fastcall TForm1 BitBtn3Click TObject Sender int Matrix head poi

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
void __fastcall TForm1::BitBtn3Click(TObject *Sender)
{ int i,j;
Matrix head, *pointer, head2, *pointer2;
pointer=&head;
pointer2=&head2;
i=0;
if (symmetry()==1)
{
for(;pointer!=NULL;pointer=pointer->next)
{
if (((pointer->i<i)||(pointer->i==i)) && ((pointer->j>i)||(pointer->j==i)))
{
pointer2->next= new Matrix;
pointer2=pointer->next;
pointer2->value= pointer->value ;
pointer2->i=pointer->i;
pointer2->j=pointer->j;
pointer2->next=NULL;
i++;
}
}
}