I was tring to write some data in a file from the singly linked list and also read the data from that and append it to singly linked list in the begening of the program.For this i had written two seperate functions .
1. writetofile
2. readfromfile

for appending the data in SLL i had used append function

Everything is working well and good .But i m facing a problem :cry: when i write vast amount of data in the file.Whwn there is almost 500 records , and now i want to write some data its appending in SLL but its failed to be written in the file and as a rsult all the data is lost . I want to know wats the problem ?? Please help me . I m doing something wrong ??

Ps. I know that entering almost 500 records is not a joke to test this program.So i m attaching the file data.txt which i had used to store the records. plzz save this file in c:\cheque :rolleyes:


Here's the code :

# include<stdio.h>
# include<conio.h>
# include<graphics.h>
# include<stdlib.h>
# include<dos.h>
# include<string.h>
# include<math.h>

void writetofile(struct node *);
void readfromfile(FILE *,struct node **);
void append(struct node **,char[],char[],char[],char[],char[],long float,char[]);
void display(struct node **);
int check_tel(char[]);
int check_cheque(char[]);
int checkdate(char[]);
int converttointeger(char[]);

struct node         /* Data structure of list */
{    char telno[8];
     char chequeno[7];
     char bankname[50];
     char paydate[12];
     char chequedate[12];
     long float amount;
     char station[4];
     struct node *link;
};

struct f_node             /* Data structure of file */
{    char telno[8];
     char chequeno[7];
     char bankname[50];
     char paydate[12];
     char chequedate[12];
     long float amount;
     char station[3];
};
struct f_node item; /* Variable to access on the file */

void main()
{
      clrscr();
      struct node *p;  /* Header node */
      p = NULL;      /* Empty List */
      char tel[8],ch[7];
      long float am;
      char bn[50],pd[12],cd[12],st[3];
      char choice;
      FILE *fp;
      fp = fopen("c:\\cheque\\data.txt","r");
      readfromfile(fp,&p);
      do
  {   menu:
      clrscr();
      printf("\n1. Entering Of Records");
      printf("\n2. Printing Of Records");
      printf("\n3. Quit");
      printf("\nEnter The Number Of Your Choice");
      fflush(stdin);
      choice = getch();
      switch(choice)
      {    case '1':

	   printf("\n\" ENTER TELEPHONE NO 99 TO EXIT \"");
	   int i=1,ll;
	   while(1)
	   { 	printf("%d .",i);
		tel:
		printf("\n\" ENTER TELEPHONE NO 99 TO EXIT \"");
		printf("          ");fflush(stdin);
		printf("\nENTER TELEPHONE NO : ");gets(tel);
		if(strcmp(tel,"99")==0)
		{  goto breakwhile;
		}
		ll = check_tel(tel);
		if( ll == 0)
		{  printf("\n\" INVALID TELEPHONE NUMBER. ENTER 7 DIGIT NUMBER OR 99 TO EXIT \"");
		   getch();
		   goto tel;
		}
		cheq:
		printf("\n\" ENTER TELEPHONE NO 99 TO EXIT \"");
		fflush(stdin);
		printf("\nENTER CHEQUE NO : ");gets(ch);
		ll = check_cheque(ch);
		if( ll == 0)
		{  printf("\n\" INVALID ENTRY. ENTER A VALID 6 DIGIT CHEQUE NUMBER  \"");
		   getch();
		   goto cheq;
		}

		fflush(stdin);
		printf("\nENTER BANK NAME : ");gets(bn);

		phdate:
		printf("\n\" ENTER TELEPHONE NO 99 TO EXIT \"");
		printf("          ");
		fflush(stdin);
		printf("\nENTER PAYMENT DATE : ");gets(pd);
		ll = checkdate(pd);
		if( ll == 0)
		{  cprintf("\n\" INVALID ENTRY. ENTER A VALID DATE IN dd/mm/yyyy FORMAT \"");
		   getch();
		   goto phdate;
		}
		chdate:
		printf("\n\" ENTER TELEPHONE NO 99 TO EXIT \"");
		printf("          ");
		fflush(stdin);
		printf("\nENTER CHEQUE DATE : ");gets(cd);
		ll = checkdate(cd);
		if( ll == 0)
		{  printf("\n\" INVALID ENTRY. ENTER A VALID DATE IN dd/mm/yyyy FORMAT \"");
		   getch();
		   goto chdate;
		}
		printf("\nENTER AMOUNT : ");scanf("%lf",&am);
		fflush(stdin);
		sta:
		printf("       ");
		printf("\nENTER STATION : ");gets(st);
		if(strlen(st) > 3 || strlen(st) == 0)
		{  printf("\n\" INVALID ENTRY. ENTER A VALID STATION CODE \"");
		   getch();
		   goto sta;
		}
		append(&p,tel,ch,bn,pd,cd,am,st);
		i++;
	   }
	   breakwhile:
	   writetofile(p);
	   break;

	   case '2':
	   clrscr();
	   display(&p);
	   getch();
	   break;


	   case '3':
	   printf("\nTHANK YOU.BYE");
	   getch();
	   exit(0);
	   break;

	   default:
	   goto menu;
	}
   }while(choice != '3');
      getch();
}


void writetofile(struct node *q)
{     FILE *fp;
      fp = fopen("c:\\cheque\\data.txt","w");

      if(fp==NULL)
      {  printf("File Write Error");
	 getch();
      }

      if(q==NULL)  /* Empty List */
      goto last;

      while( q != NULL)
      {  strcpy(item.telno,q->telno);
	 strcpy(item.chequeno,q->chequeno);
	 strcpy(item.bankname,q->bankname);
	 strcpy(item.paydate,q->paydate);
	 strcpy(item.chequedate,q->chequedate);
	 item.amount=q->amount;
	 strcpy(item.station,q->station);
	 fprintf(fp,"%s\t%s\t%s\t%s\t%s\t%lf\t%s\n",item.telno,item.chequeno,item.bankname,item.paydate,item.chequedate,item.amount,item.station);
	 q=q->link;
      }
      last:
      fclose(fp);
}

void readfromfile(FILE *fp,struct node **q)
{    while(!feof(fp))
     {   fscanf(fp,"%s\t%s\t%s\t%s\t%s\t%lf\t%s\n",&item.telno,&item.chequeno,item.bankname,item.paydate,item.chequedate,&item.amount,item.station);
	 append(q,item.telno,item.chequeno,item.bankname,item.paydate,item.chequedate,item.amount,item.station);
     }
     fclose(fp);
}
void append(struct node **q,char tel[],char ch[],char bn[],char pd[],char cd[],long float am,char st[])
{   struct node *temp,*r;
    temp = *q;
    if(*q==NULL)
    {  temp = (struct node *) malloc(sizeof(struct node));
       strcpy(temp->telno , tel);
       strcpy(temp->chequeno,ch);
       strcpy(temp->bankname,bn);
       strcpy(temp->paydate,pd);
       strcpy(temp->chequedate,cd);
       strcpy(temp->station,st);
       temp->amount = am;

       temp->link=NULL;
       *q = temp;
    }
    else
    {  temp = *q;
       while(temp->link != NULL)
      {   temp=temp->link;
      }
       r = (struct node*)malloc(sizeof(struct node));
       strcpy(r->telno,tel);
       strcpy(r->chequeno,ch);
       strcpy(r->bankname,bn);
       strcpy(r->paydate,pd);
       strcpy(r->chequedate,cd);
       strcpy(r->station,st);
       r->amount = am;

      r->link =NULL;
      temp->link = r;
    }
}

void display (struct node **q)
{  struct node *temp;
   temp=*q;
   writetofile(*q);
   int ll;
   if(*q==NULL)
   {  printf("EMPTY LIST");
      getch();
   }
   int xyz=5,i=1;
   while(temp !=NULL)
   {        gotoxy(2,xyz);printf("%d .",i);
	    gotoxy(8,xyz);printf("%s",temp->telno);
	    gotoxy(18,xyz);printf("%s",temp->chequeno);
	    gotoxy(26,xyz);printf("%s",temp->bankname);
	    gotoxy(42,xyz);printf("%s",temp->paydate);
	    gotoxy(53,xyz);printf("%s",temp->chequedate);
	    gotoxy(64,xyz);printf("%.2lf",temp->amount);
	    gotoxy(73,xyz);printf("%s",temp->station);
	    xyz++;
	    if(xyz==21)
	    {   xyz=4;
		getch();
		clrscr();
		gotoxy(22,23);printf("\" HIT A KEY TO VIEW TEXT PAGE \"");
	     }
	     i++;
	    temp=temp->link;
    }
   
}

           

int check_tel(char tt[])
{   int l,i,count=0;
    l = strlen(tt);
    for(i=0;i<l;i++)
    {  if(tt[i] <= 57 && tt[i] >=48)
       count++;
    }
    if(count==l && l==7)
    return 1;

    else
    return 0;
}

int check_cheque(char tt[])
{   int l,i,count=0;
    l = strlen(tt);
    for(i=0;i<l;i++)
    {  if(tt[i] <= 57 && tt[i] >=48)
       count++;
    }
    if(count==l && l==6)
    return 1;

    else
    return 0;
}

int checkdate(char a[])
{  int l,d,y,logic = 0;char dd[4],mm[4],yy[5];
   l = strlen(a);
   if(l!=10)
   return 0;

   else if(a[2] !='/' && a[5] !='/')
   return 0;

   dd[0]=a[0];dd[1]=a[1];dd[2]='\0';
   mm[0]=a[3];mm[1]=a[4];mm[2]='\0';
   yy[0]=a[6];yy[1]=a[7];yy[2]=a[8];
   yy[3]=a[9];yy[4]='\0';
   d = converttointeger(dd);
   y = converttointeger(yy);



   // Case of months having 31 days

   if(strcmp(mm,"01")==0 || strcmp(mm,"03")==0 || strcmp(mm,"05")==0 || strcmp(mm,"07")==0 || strcmp(mm,"08")==0 || strcmp(mm,"10")==0 || strcmp(mm,"12")==0 )
   {  if( d>=1 && d<=31)
      { logic = 1;
      }
   }
   // Case of Februaury
   else if(strcmp(mm,"02")==0)
   {   if(d>=1 && d<=28)
       { logic =1;
       }
       if(d == 29 && y % 4 == 0)
       { logic=1;
       }
   }
   // Case of months having 30 days
   else if(strcmp(mm,"04")==0 || strcmp(mm,"06")==0 || strcmp(mm,"09")==0 || strcmp(mm,"11")==0)
   {
       if(d>=1 && d<=30)
       {  logic =1;
       }
   }

   return logic;
}

int converttointeger(char str[])
{  int r,p,i,k;
   r=0;
   k=0;
   p = pow(10,(strlen(str)-1));
   for(i=0;i<strlen(str);i++)
   {  k= str[i] - '0';
      r += (k*p);
      p/=10;
   }
   return r;
}
Attachments
2264551	813675	SBI,1254	09/06/2005	28/05/2005	1035.000000	PT
2264360	846555	SBI,1254	09/06/2005	26/05/2005	595.000000	PT
9431020762	365526	SBI,2014	09/06/2005	20/05/2005	800.000000	PT
2021781	797309	SBI,2009	09/06/2005	03/06/2005	1179.000000	PT
2551780	633231	SBI,2016	09/06/2005	02/05/2005	3313.000000	PT
2270711	524977	SBI,1389	09/06/2005	01/06/2005	551.000000	PT
2273140	042576	SBI,2049	09/06/2005	09/06/2005	1278.000000	PT
2560606	087302	SBI,2012	09/06/2005	06/06/2005	974.000000	PT
2560219	980715	SBI,2012	09/06/2005	06/06/2005	1281.000000	PT
2560476	974817	SBI,2012	09/06/2005	06/06/2005	1016.000000	PT
2560521	966967	SBI,2012	09/06/2005	06/06/2005	747.000000	PT
2273611	148530	SBI,1513	09/06/2005	30/05/2005	1083.000000	PT
2550399	136909	SBI,1513	09/06/2005	02/06/2005	1259.000000	PT
2263894	138673	SBI,1513	09/06/2005	31/05/2005	1798.000000	PT
2261948	918551	SBI,1513	09/06/2005	26/05/2005	715.000000	PT
2278281	138394	SBI,1513	09/06/2005	20/05/2005	565.000000	PT
2264604	707817	SBI,1513	09/06/2005	23/05/2005	808.000000	PT
2260851	063176	SBI,2033	09/06/2005	26/05/2005	1217.000000	PT
2260199	335652	SBI,2033	09/06/2005	25/05/2005	1877.000000	PT
2274542	852185	SBI,2048	09/06/2005	09/06/2005	2550.000000	PT
2261561	050467	SBI,2033	09/06/2005	27/05/2005	657.000000	PT
2265847	027638	SBI,2033	09/06/2005	28/05/2005	949.000000	PT
2550187	065557	SBI,2033	09/06/2005	27/05/2005	1463.000000	PT
2550187	065556	SBI,2033	09/06/2005	27/05/2005	2463.000000	PT
2266942	921851	SBI,2033	09/06/2005	27/05/2005	1890.000000	PT
2550571	056483	SBI,2033	09/06/2005	01/06/2005	412.000000	PT
2023579	025896	SBI,2033	09/06/2005	09/06/2005	1113.000000	PT
2260579	025897	SBI,2033	09/06/2005	09/06/2005	1712.000000	PT
2262772	041184	SBI,2033	09/06/2005	30/05/2005	569.000000	PT
2550571	056482	SBI,2033	09/06/2005	01/06/2005	831.000000	PT
2561219	090607	SBI,2012	09/06/2005	08/06/2005	895.000000	PT
2284187	214880	SBI,2008	09/06/2005	09/06/2005	1280.000000	PT
2560196	147816	SBI,2026	09/06/2005	09/06/2005	4266.000000	PT
2262791	066636	SBI,2033	09/06/2005	28/05/2005	332.000000	PT
2270408	054679	SBI,2033	09/06/2005	28/05/2005	622.000000	PT
2278888	920515	SBI,2033	09/06/2005	27/05/2005	572.000000	PT
2560196	147817	SBI,2026	09/06/2005	09/06/2005	4347.000000	PT
2551227	234045	SBI,2033	09/06/2005	26/05/2005	1704.000000	PT
2271424	085864	SBI,2033	09/06/2005	13/05/2005	842.000000	PT
2263437	450545	SBI,2049	09/06/2005	27/05/2005	4434.000000	PT
2262102	450546	SBI,2049	09/06/2005	27/05/2005	3070.000000	PT
2260388	339546	SBI,1513	09/06/2005	30/05/2005	1076.000000	PT
2264029	787890	SBI,2033	09/06/2005	30/05/2005	635.000000	PT
2261491	335560	SBI,2033	09/06/2005	28/05/2005	1891.000000	PT
2278086	106616	SBI,2033	09/06/2005	01/06/2005	2017.000000	PT
2550299	104343	SBI,2033	09/06/2005	31/05/2005	721.000000	PT
2265746	059765	SBI,2033	09/06/2005	31/05/2005	2874.000000	PT
2343786	059764	SBI,2033	09/06/2005	31/05/2005	1754.000000	PT
2260952	051307	SBI,2033	09/06/2005	31/05/2005	1466.000000	PT
2263283	034962	SBI,2033	09/06/2005	31/05/2005	808.000000	PT
2550794	042876	SBI,2033	09/06/2005	03/06/2005	723.000000	PT
2287348	787721	SBI,2033	09/06/2005	01/06/2005	1417.000000	PT
2276666	037327	SBI,2033	09/06/2005	21/05/2005	4278.000000	PT
2270680	054351	SBI,2033	09/06/2005	25/05/2005	1980.000000	PT
9431017165	063177	SBI,2033	09/06/2005	26/05/2005	1159.000000	PT
9431024193	022790	SBI,2033	09/06/2005	31/05/2005	1387.000000	PT
9431020803	335651	SBI,2033	09/06/2005	25/05/2005	1025.000000	PT
9431021232	106884	SBI,2033	09/06/2005	18/05/2005	1212.000000	PT
9431023233	092572	SBI,2033	09/06/2005	18/05/2005	1634.000000	PT
9431009470	049918	SBI,2033	09/06/2005	20/05/2005	932.000000	PT
9431009682	045639	SBI,2033	09/06/2005	16/05/2005	1064.000000	PT
9431023660	076561	SBI,2033	09/06/2005	25/05/2005	601.000000	PT
9431022939	065855	SBI,2033	09/06/2005	25/05/2005	1353.000000	PT
9431009840	450751	SBI,2049	09/06/2005	23/05/2005	587.000000	PT
9431011720	450412	SBI,2049	09/06/2005	23/05/2005	1095.000000	PT
9431015380	042701	SBI,2049	09/06/2005	25/05/2005	1658.000000	PT
9431024626	609000	SBI,2049	09/06/2005	25/05/2005	828.000000	PT
9431015975	063178	SBI,2033	09/06/2005	26/05/2005	803.000000	PT
9431023186	798298	SBI,3560	09/06/2005	24/05/2005	698.000000	PT
2260780	798300	SBI,3560	09/06/2005	27/05/2005	961.000000	PT
2275057	707808	SBI,3560	09/06/2005	26/05/2005	1176.000000	PT
2271274	642688	SBI,3454	09/06/2005	26/05/2005	801.000000	PT
2261721	641927	SBI,3454	09/06/2005	27/05/2005	2196.000000	PT
2270447	909920	SBI,3114	09/06/2005	25/05/2005	216.000000	PT
2550782	915890	SBI,3114	09/06/2005	01/06/2005	753.000000	PT
2268331	578292	SBI,2043	09/06/2005	03/06/2005	590.000000	PT
2270590	557769	SBI,2043	09/06/2005	01/06/2005	863.000000	PT
2276626	746826	SBI,2043	09/06/2005	30/05/2005	1004.000000	PT
2271838	570905	SBI,2043	09/06/2005	24/05/2005	1414.000000	PT
2284092	259161	SBI,2042	09/06/2005	24/05/2005	1139.000000	PT
9431023719	259162	SBI,2042	09/06/2005	23/05/2005	428.000000	PT
9431020356	737405	SBI,2043	09/06/2005	21/05/2005	679.000000	PT
9431025766	749127	SBI,2043	09/06/2005	26/05/2005	610.000000	PT
2275637	010990	SBI,1233	09/06/2005	28/05/2005	819.000000	PT
2273400	010633	SBI,2034	09/06/2005	30/05/2005	787.000000	PT
2266901	003175	SBI,1662	09/06/2005	26/05/2005	963.000000	PT
2265354	690346	SBI,2050	09/06/2005	24/05/2005	1914.000000	PT
9431017820	330347	SBI,2005	09/06/2005	26/05/2005	1442.000000	PT
2590964	955314	SBI,2022	09/06/2005	31/05/2005	1118.000000	PT
2275574	655776	SBI,2022	09/06/2005	26/05/2005	1636.000000	PT
9431016531	759548	SBI,2022	09/06/2005	24/05/2005	1278.000000	PT
9431022981	759549	SBI,2022	09/06/2005	24/05/2005	1485.000000	PT
2272379	882785	SBI,2006	09/06/2005	28/05/2005	5303.000000	PT
9431012330	195126	SBI,2006	09/06/2005	21/05/2005	1825.000000	PT
9431009331	195127	SBI,2006	09/06/2005	21/05/2005	862.000000	PT
9431021956	026238	SBI,2006	09/06/2005	24/05/2005	2611.000000	PT
2268290	581116	SBI,2006	09/06/2005	31/05/2005	838.000000	PT
2264426	854142	SBI,0152	09/06/2005	25/05/2005	1271.000000	PT
2276423	591129	SBI,0152	09/06/2005	27/05/2005	1092.000000	PT
2276423	591128	SBI,0152	09/06/2005	27/05/2005	814.000000	PT
2551549	855866	SBI,0152	09/06/2005	02/06/2005	757.000000	PT
9431024851	520363	SBI,2036	09/06/2005	24/05/2005	364.000000	PT
9431020152	581012	SBI,2036	09/06/2005	23/05/2005	704.000000	PT
9431010666	426346	SBI,2036	09/06/2005	23/05/2005	376.000000	PT
9431012205	560935	SBI,2036	09/06/2005	25/05/2005	365.000000	PT
2287278	331700	SBI,2036	09/06/2005	21/05/2005	1013.000000	PT
2264245	408786	SBI,2036	09/06/2005	21/05/2005	2149.000000	PT
2235143	467545	SBI,2036	09/06/2005	31/05/2005	1318.000000	PT
2551557	493049	SBI,2036	09/06/2005	02/06/2005	937.000000	PT
2578873	145282	SBI,2036	09/06/2005	01/06/2005	304.000000	PT
9431009047	344905	SBI,2039	09/06/2005	30/05/2005	1645.000000	PT
2273215	313238	SBI,2039	09/06/2005	27/05/2005	1853.000000	PT
2267489	635779	SBI,7506	09/06/2005	23/05/2005	638.000000	PT
2260815	957966	SBI,2030	09/06/2005	26/05/2005	637.000000	PT
2266134	975423	SBI,2030	09/06/2005	24/05/2005	3124.000000	PT
2286462	248418	SBI,2021	09/06/2005	31/05/2005	712.000000	PT
9431020156	434566	SBI,2041	09/06/2005	23/05/2005	1362.000000	PT
2280702	904623	SBI,2041	09/06/2005	30/05/2005	2169.000000	PT
2265672	322558	SBI,2048	09/06/2005	30/05/2005	1794.000000	PT
2572286	246714	SBI,2048	09/06/2005	01/06/2005	583.000000	PT
2265023	973342	SBI,2048	09/06/2005	24/05/2005	721.000000	PT
2246401	498736	SBI,2048	09/06/2005	24/05/2005	987.000000	PT
2683118	973081	SBI,2048	09/06/2005	23/05/2005	735.000000	PT
2683118	973080	SBI,2048	09/06/2005	23/05/2005	483.000000	PT
2683118	973079	SBI,2048	09/06/2005	23/05/2005	695.000000	PT
2265023	973341	SBI,2048	09/06/2005	24/05/2005	828.000000	PT
9431022621	345692	SBI,2048	09/06/2005	20/05/2005	2320.000000	PT
9431018791	363385	SBI,2048	09/06/2005	26/05/2005	857.500000	PT
2551340	363411	SBI,2048	09/06/2005	27/05/2005	2073.000000	PT
2523929	159039	SBI,2008	09/06/2005	31/05/2005	627.000000	PT
2268120	776994	SBI,2008	09/06/2005	31/05/2005	1062.000000	PT
2266327	146008	SBI,2008	09/06/2005	31/05/2005	795.000000	PT
2270747	905927	SBI,2008	09/06/2005	31/05/2005	2288.000000	PT
2277536	316641	SBI,2008	09/06/2005	01/06/2005	1344.000000	PT
9431019960	578523	SBI,2008	09/06/2005	25/05/2005	805.000000	PT
9431016382	230892	SBI,2008	09/06/2005	25/05/2005	387.000000	PT
9431022740	212666	SBI,2008	09/06/2005	24/05/2005	704.000000	PT
2263514	310660	SBI,2008	09/06/2005	23/05/2005	666.000000	PT
9431024273	391385	SBI,2008	09/06/2005	18/05/2005	1922.000000	PT
9431225204	391384	SBI,2008	09/06/2005	18/05/2005	727.000000	PT
9431018459	391383	SBI,2008	09/06/2005	18/05/2005	2482.000000	PT
9431018440	370975	SBI,2008	09/06/2005	25/05/2005	598.000000	PT
9431602033	230963	SBI,2008	09/06/2005	26/05/2005	515.000000	PT
9431016042	185195	SBI,2008	09/06/2005	26/05/2005	378.000000	PT
9431021557	057778	SBI,2008	09/06/2005	26/05/2005	1891.000000	PT
2263186	079576	SBI,2008	09/06/2005	25/05/2005	2111.000000	PT
2260496	058492	SBI,2008	09/06/2005	28/05/2005	777.000000	PT
9431020028	063792	SBI,2033	09/06/2005	17/05/2005	5137.000000	PT
9431015614	148253	SBI,2026	09/06/2005	25/05/2005	538.000000	PT
2263003	198121	SBI,2026	09/06/2005	28/05/2005	1176.000000	PT
2271840	149901	SBI,2026	09/06/2005	01/06/2005	743.000000	PT
2274843	156595	SBI,2026	09/06/2005	28/05/2005	932.000000	PT
2268717	152765	SBI,2026	09/06/2005	30/05/2005	551.000000	PT
2265795	142822	SBI,2026	09/06/2005	28/05/2005	1259.000000	PT
2262064	152450	SBI,2026	09/06/2005	30/05/2005	910.000000	PT
2265255	145733	SBI,2026	09/06/2005	01/06/2005	3597.000000	PT
2265267	495579	SBI,2026	09/06/2005	01/06/2005	1110.000000	PT
2278146	151485	SBI,2026	09/06/2005	01/06/2005	1503.000000	PT
2263943	163061	SBI,2026	09/06/2005	31/05/2005	728.000000	PT
9431025917	088121	SBI,2012	09/06/2005	13/05/2005	1169.000000	PT
9431024652	091590	SBI,2012	09/06/2005	23/05/2005	1305.000000	PT
2274123	093804	SBI,2012	09/06/2005	01/06/2005	808.000000	PT
2268480	979661	SBI,2012	09/06/2005	21/05/2005	564.000000	PT
2572118	020010	SBI,4070	09/06/2005	06/06/2005	1733.000000	PT
2273733	212

Everything is working well and good

I can't even get it to compile.

long float amount;

Using types before they are defined. And I don't have graphics.h. (That's the joy of nonstandard code -- fewer folks who can help.)

U can delete the line #include<graphics.h> and for the time being u can use float instead of long float

This article has been dead for over six months. Start a new discussion instead.