C File processing and matching help -
i have assignment in college in required read in 2 .dat (aascii) files created earlier program, both of sorted. one client account file contains clients balance , account number , name, other transaction file contains account number , transactions account. this program has match account numbers , create new , updated clients file adding transaction amount balance of client based on accounts number. i have working fine except when there duplicate transaction example if transaction file contains 2 separate transactions 2nd client code print updated balance after both transactions instead of cumulative balance. i wondering if can shed light on how solve problem. code attached, in advance. #include <stdio.h> #include <conio.h> int main() { int account,matches=0; /* account number */ char date[ 30 ]; /* account date */ double balance, saleamount,total=0, x; /* account saleamount */ int transaccount; char name [ 30 ]; file *cfptr; ...