The program would then read the data from 'trans.txt' file and add all the values up. Also there will be count to see the number of transaction performed. The deposits will be added and withdrawals will be subtracted from base amount of $0.00
Is there a way where code would recognize either it is depositing or withdrawing money and appropriately add or subtract?
If the code reads 'trans.txt' one line at a time into a string you can use the find method of the string class to discover if the line has 'deposit' or 'withdrawal' in it. You can then use substr to get the rest of the line (which will be the amount) and add or subtract accordingly.
Repeat until you have read the whole file.
See http://www.cplusplus.com/doc/tutorial/files.html for using files and http://www.cplusplus.com/reference/string/ for the string class if you need info on either.