How to create a flexible object?

How can I create various instances of an object and store it in a linked list.?

  • For example. An order which contains the name of the person, their address and their order number created into an object and then stored into a linked list after which a new user enters their info and an object is created again and then the info is stored into another node in the list.

  • Answer:

    Here is a good start:

Vivi at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

You can put the order info directly in the node. For example: struct Order { ........................... }; struct Node { struct Node* next; struct Order info; };

Thai

b

David

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.