Dear Mr. Zyrenthian you have asked for the code of Create node and the structure of the node so they are as follows
also if you will give ur mail id i can able to mail your whole code then only you will be able to solve the problem
So the code for the creation of the node is as follows
The function is call as
append(&start,temp,a);
"start" is a new node
"temp" is a pointer character variable where the record is stored which has to be stored in the linked list
append(node **list,char *temp1,int x)
{
int i;
int flag=0;
node *n;
node *traverse;
char a[15]; * pointer to preceding key node */
traverse=*list;
if(*list==NULL)
{
*list= new node;
traverse=*list;
}
else
{
while(traverse->next!=NULL)
traverse=traverse->next;
traverse->next= new node;
traverse = traverse->next;
}
traverse->b = x;
for(i=0;i<30;i++)
{
traverse->name=temp1[i+1];
}
for(i=0;i<30;i++)
{
traverse->grpname=temp1[i+61];
}
flag=0;
for(i=0;i<15;i++)
{
a=temp1[i+291];
if (a=='-')
{
a=' ';
flag=1;
}
}
if(flag)
{
traverse->dopbal=amount(a);
traverse->copbal=0.0;
}
else
{
traverse->copbal=amount(a);
traverse->dopbal=0.0;
}
flag=0;
for(i=0;i<15;i++)
{
a=temp1[i+306];
if(a=='-')
{
a=' ';
flag=1;
}
}
if(flag)
{
traverse->dclosebal=amount(a);
traverse->cclosebal=0.0;
}
else
{
traverse->cclosebal=amount(a);
traverse->dopbal=0.0;
}
traverse->next=NULL;
return(0);
}
And the structure is as follows
struct ledger
{
int b;
char name[30];
char grpname[30];
float dopbal;
float dclosebal;
float copbal;
float cclosebal;
struct ledger *next;
};
typedef struct ledger node;
node *start;