Write your question here.
Doing a project but i dont know how to even start. Here are the instruction
This program shall:
• open the DB file: TestDB.dat
• read it into your structure array,
• display it on the screen, and
• write it to an output text file named: testout.dat
and the TEST DB file contains this info
RS001
McAllister, Billie Joe, Dean
123-89-4321
+1 775-332-4581
WF0342 75000.00 4.85 12
SB1942 100000.00 3.5 12
BA0001 23988.88 7.5 12
VG003
van Gogh, Vincent, Willem
945123-88822
+31 20 570 5200
ART015 100.00 2.5 12
C123A
James Jr., Jesse, Woodsen
323-77-2134
(816)736-8500
Z52C42 126812.33 5.0 1
XXXC42 75000.00 4.5 12
JJ1847 34009.05 2.5 12
JJ1882 1004.03 0.5 12
CC1492 19754.00 3.55 4
the first step is to open file and read the data but i cant even do that.
Any help will be great!!
PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.
Now you need to answer jlb's second question.
In your Customer struct, you must give your char[] variables explicit sizes.
jlb what do you mean how i know when one record ends and another begins??
so for example this an account for one customer and I'm suppose to read each individual line.
RS001 // cust id
McAllister, Billie Joe, Dean // lname. fname, mnane
123-89-4321 // tax id
+1 775-332-4581 // phone number
WF0342 75000.00 4.85 12// Account number, Balance ,Rate, year
SB1942 100000.00 3.5 12// Account number, Balance ,Rate, year
BA0001 23988.88 7.5 12 // Account number, Balance ,Rate, year
You have been asked multiple times to use code tags. PLEASE DO SO.
If you're not going to make the slightest bit of effort to make your posts readable, why should we spend the slightest bit of effort helping you?
I will not respond further until you apply code tags.
> what do you mean how i know when one record ends and another begins??
1 2 3 4 5 6 7 8 9 10 11 12
RS001 //cust id
McAllister, Billie Joe, Dean
123-89-4321
+1 775-332-4581
WF0342 75000.00 4.85 12 //account ...
SB1942 100000.00 3.5 12
BA0001 23988.88 7.5 12
VG003 //cust id
van Gogh, Vincent, Willem
945123-88822
+31 20 570 5200
ART015 100.00 2.5 12
¿how do you know that VG003 is a customer id and not another account from McAllister?
¿how do you know that McAllister has three accounts?
Item_Info[50];`Item_info' is a type, like char, int, double and Customer
you forgot to give a name to your variable, like you did with phone_num, cust_id, rate and balance