Thread: Ordering Queue

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    8

    Ordering Queue

    I'm trying to make a program that will put n amount of orders into a queue in the same order that the user enters them and then will remove the first n orders that the user inputs and prints the cost of these orders. Can anyone help me get started I really am not sure where to begin.

  2. #2
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    A good tip would be to calculate the cost before you remove them, then
    assuming you are using a linked list point the base pointer to the next order
    and free any memory allocated to the orders to be deleted.

    If you send me £50 I will write the code

  3. #3
    Registered User
    Join Date
    May 2006
    Posts
    8
    I'm not gonna PAY for it, but thanks for the advice.
    What is the cost of an order anyways?

  4. #4
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by Japatron
    I'm not gonna PAY for it, but thanks for the advice.
    What is the cost of an order anyways?
    Well presumably in the order there is a 'cost' field/item,
    thats it!!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with FIFO QUEUE
    By jackfraust in forum C++ Programming
    Replies: 23
    Last Post: 04-03-2009, 08:17 AM
  2. Fixing my program
    By Mcwaffle in forum C Programming
    Replies: 5
    Last Post: 11-05-2008, 03:55 AM
  3. help with queues
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 05-21-2002, 09:09 PM
  4. help with queues
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 05-21-2002, 11:39 AM
  5. queue help
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 10-29-2001, 09:38 AM