Linked Lists

Hi,
Im new to C++ and trying to get linked lists working but am stuck...here is what I currently have:

class Flight
{
public:
string fnum;
string dcity;
string arrcity;
string depdate;
string arrdate;
string deptime;
string arrtime;
int seats;
int cost;
int bags;

};

struct Node
{
public:
string num;
struct Node *next;
Flight g;

};
//This is declared later:
Flight f;
Node *n;
n = (Node*)malloc(sizeof(Node));

n-> next = start;
n-> g = f;
n-> num = flightnum;
start = n;

//As you can see I am trying to create an instance of the flight class in the Node but currently the program stops responding. I have included all the information to go into the flight class in another method.
Thanks
Topic archived. No new replies allowed.