loading a objects from a file into a class of objects and then putting those objects into 1 block of an array.
Posted on 2005-04-16
THis might be the wrong way to go about this but its whats in my head right now. Ok so I have a file of data and each line of data is going to be a record. Each line has been loaded into a class of objects. Now what I want to do is put all those object into one block of an array, and then load the next line into the class and stick that into the next block of the array and so on. My problem is I'm putting the info thats in the classes into the array. If its not possible to put a buch of info into one block of my array, I'll setting for just putting them into the array.
THis is what I'm thinking but I'm not sure. addressBook1 is my array, the class name is addressInfo (some how I think this hould be included but I'm not sure where.), addressNum is my counter.
void loadBook(addressBook addressBook1,int &addressNum);
cout<<endl<"THe myAddresses file did not open";