Line head pointer Matrix head2 pointer2 int pointer head pointer2 head

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Line head, *pointer;
Matrix head2, *pointer2;
int i,j;
pointer=&head;
pointer2=&head2;
for (i=0;i<1000;i++)
{
if (StringGrid1->Rows[i]!="")
{ pointer2->next= new Matrix;
pointer2=pointer2->next;
pointer2->i=i;
pointer2->value=pointer;
pointer2->next=NULL;
for (j=0;j<1000;j++)
{
if (StringGrid1->Cells[j][i]!="")
{
pointer->next= new Line;
pointer=pointer->next;
pointer->value= StrToInt(StringGrid1->Cells[j][i]);
pointer->j=j;
pointer->next=NULL;
}
}
}