Good day, I am a freshmen student in need of some help. I have created an ATM program. This program has text files created for the withdraw transaction, deposit etc. It is like a database program for me. First of all, I would like to know how to compare strings and search within the text file the account number of a person. For example, I registered in the ATM account with my name. Afterwards, it will show my account ID like 1478 which will I could use for the next login purposes. I am wondering how could I make the program recognize the name of the user or the ID. Another thing that this user database or the user text files append or just adds the new ID or the new name registered.

After the transactions have been made, the program should print-out like a receipt what the user has done. For example,
Date of Transaction : 03/24/10
MyName :
Initial balance : 20000
Deposited : 2000.00
Deposited : 1000.00
Withdrawed : 500.00
Withdrawed : 1500.00
Current Balance : 21000.00

Like this one in a hardcopy. The recorded transactions will be appended again to show what transactions the user have done. I am welcome for any program buiding. I am using C-Free, mingW 5.0 compiler. Thanks alot.

Recommended Answers

All 2 Replies

sending a file to a printer is going to be highly specific to your OS and your particular environment. is your computer on a network or is it locally controlled?

consider printing your receipt to a text file, then opening it up in a text viewer (notepad or gedit) and printing it directly from the viewer.

The printer would probably installed as we will present the program. I don't know if a computer or a laptop will be used. If I may ask, is system("print") under process.h works for Windows XP? I think all of the OSes used are WXP. Another question if you don't mind, how would the program know the text file's line. For example, I entered :

1 at Line 1 of the text file.
2 at Line 2
3 at Line 3 etc.

How would the compiler show that 1 is in Line 1 of the text file? :S I'm really gettin' a hard time.

Thanks for the reply btw.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.