First I just wanted to say thanks for all the help everyone has provided for me before. I'm sure you wanted to reach through the internet and strangle me :) .
I having some difficulty with understanding/implementing a linked list class with another class. Just something as simple as interacting with each class has me puzzled. Say I have a class called race car. This class contains the make, number, team and driver of the race car. Then say there is a race track class. This class will define a linked list for the race car class. The member functions might do a bunch of things like add, swap, delete and print. I'm not concerned with the member functions. Would something like this work:
class racecar {
private:
string make, team, driver;
int number;
.
.
.
.
};
class raceTrack {
typedef racecar* ListItemType;
private:
racecar make, team, number;
struct ListNode
{
ListItemType item;
ListNode *next;
};
.
.
.
};
This is just an example I thought of. Could someone help me by using this example or show a different example? Thanks.