Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,233 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,737 people online right now. Registration is fast and FREE... Join Now!




Text File Help

 
Reply to this topicStart new topic

Text File Help, n0oB

7OXIC
14 Mar, 2007 - 01:20 PM
Post #1

New D.I.C Head
*

Joined: 14 Mar, 2007
Posts: 10


My Contributions
Ok, like I stated I am fairly new to coding and currently learning C++ in college right now. Well, are teacher has givin a "class" project to do and it is 80% of are grade! Well, I'm pretty much on my own with this class so I am now here asking for help biggrin.gif

My problem is this (I hope I can explain it well enough). We have to design a prototype ATM application. It must be able to store and update 5 different users information. I need to be able to withdraw, deposit, and check the balance of accounts. Well, I dont know how to create the text files for the fstream to get the information from. I have the actual C++ program right now in front of me, and when I compiled it with Borland Compiler in class I only had 2 errors and fixed fairly easily. If I can just figure out how to create the text files it should run. I need to be able to store account number/PIN number and their account balance.
User is offlineProfile CardPM
+Quote Post

horace
RE: Text File Help
14 Mar, 2007 - 02:00 PM
Post #2

D.I.C Addict
Group Icon

Joined: 25 Oct, 2006
Posts: 573



Thanked: 4 times
Dream Kudos: 50
My Contributions
if your input data is in text files you can create these with an ordinary text editor such as wordpad or notepad under Windows or gedit or nedit under linux. For example if your read was something like
CODE

   int i;
   float x;
   file >> i >> x;

to read an int then a float the appropriate line in the text file could be
10 15.678


i would have the value 10 and x the value 15.678
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 03:48PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month