| | |
C++ Extracting data from text files
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
It's exactly C++ battlefield!
Declare class Member as an abstract class (with pure virtual functions), define these virtual functions in FullMember and YoungMember classes, use vector<Member*> in your variant of my PlainDb - that's all. Polymorphism works!..
I suspect that it's a true aim of your (homework?) task.
Declare class Member as an abstract class (with pure virtual functions), define these virtual functions in FullMember and YoungMember classes, use vector<Member*> in your variant of my PlainDb - that's all. Polymorphism works!..
I suspect that it's a true aim of your (homework?) task.
It might not be that simple if you also need to keep track of whether a member is full or young. You would need to output that in some form to your text file, and then as you read the data, create an appropriate object based on whether its a full or young member.
I'm a student. If my statements seem too absolute, feel free to coat them with "In my opinion..." or "I believe...".
•
•
Join Date: Aug 2008
Posts: 11
Reputation:
Solved Threads: 0
How do you load the data from the txt files into a vector, thats what I can't understand. I have changed my program so that it only uses on text file, but each line of that files starts with either Full Mem or Young Mem depending on the account stored. Also the Young member has 4 pieces of data stored with it wheras the full mem only has three.
I want the program to call up this data so that it can be used in the accounts assciated functions i.e. deposit money, withdraw or calculate the interest etc.
I want the program to call up this data so that it can be used in the accounts assciated functions i.e. deposit money, withdraw or calculate the interest etc.
Last edited by davidleeis14; Aug 5th, 2008 at 8:24 am.
![]() |
Similar Threads
- adware.purityscan (Viruses, Spyware and other Nasties)
- Storing Text file in Database through VB (Visual Basic 4 / 5 / 6)
- spyware, pop-ups and more; amaena?? (Viruses, Spyware and other Nasties)
- adware.purityscan (Viruses, Spyware and other Nasties)
- very weird drive problems (Storage)
- urgent (C)
- Beginner needs assistance with 'error checking' program (C++)
Other Threads in the C++ Forum
- Previous Thread: plotting cpu and mem consumption
- Next Thread: HELP ME MY MISTAKE and HELP THE CORRECT The my homework
| Thread Tools | Search this Thread |
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count database delete deploy developer dll download dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph gui homeworkhelp iamthwee ifstream image input int java lib library linker list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






