i created an atm machine but the problem now is that it overwrites the file that contains the pin number information. for example,
printf("Enter pin");
scanf("%d",&pin );
inputfile=fopen ("cus_info","r" );
lets say the text contains: 101 400
102 400
103 400
400 is the balance
i enter 101 and desposit $2 the balance will be $402 but if i try again to put 2 my pin will be 2 now and the other contents is not there only the one i used.
please help!
printf("Enter pin");
scanf("%d",&pin );
inputfile=fopen ("cus_info","r" );
lets say the text contains: 101 400
102 400
103 400
400 is the balance
i enter 101 and desposit $2 the balance will be $402 but if i try again to put 2 my pin will be 2 now and the other contents is not there only the one i used.
please help!
Comment