help project due and im stuck

hey i have most of the program done, the project is a train yard simulation (inheritances practice), but i have ran into a block where im trying to read in from a file, with multiple sets of data, how should i put them into different arrays? i.e if i had say 10 arrays, and i wont know how many objects but i can just put them onto an array as the data comes in. i know its dumb but my professor is kinda weird and never really think thought her projects.
thanks in advance
(and saying that she has a set of data (instructions on a text file) then use our program to assumable it with a linked list(already done that part) then take in another set of data and do that same thing(but the problem is i wont know how many sets of data im supposed to take in because she said it can change)
so far i have the general structure of
while(file is good)
get data and put them onto a linked list to represent the trains
then using if statements to interpret the data, and when the first train ends
but now im stuck on how to generate the second and third train or 4th

please help
I think you're missing a semicolon somewhere. Maybe line 30 or 42? 42 seems like the answer. Always is.
i dont think so because that will give me an error, while compiling but right now iv worked passed all of that problems and only is left with the actualy programing:
how do i make a array of pointers each pointing to a linkedlist?
so far i have
Linklist<RailroadCar> *traintracks[10];
but now i dont know how to use it to actualy store the linkedlist into the array.
i tried these and it didnt work because they said type did not match:
Linklist<RailroadCar> temptrain;// the linkedlist i want to store into the array
and when i tried traintracks[0]= temptran;// it just tells me a type Linklist<RailroadCar> cannot be converted into Linklist<RailroadCar>*
Linklist<RailroadCar> *traintracks[10]; is an array of 10 pointers that each can point to a Linklist<RailroadCar>.
i know that much, but i dont know how to have those pointers hold the linkedlist
Linklist<RailroadCar> *traintracks[10];
traintracks[0]= &temptran;
thanks you so much for your help^^
just one last question if i want to return the value back into the linkedlist do i :
temptran= *traintracks[0];?
Topic archived. No new replies allowed.