Thread: please help me

  1. #1
    Registered User
    Join Date
    Mar 2011
    Location
    ksa
    Posts
    1

    please help me

    Implement a queue in C++ using structures and pointers only the same way as we did for List and
    Stack. DON’T USE CLASSES OR TEMPLATES. Gather all the functions and the node structure in one
    header file called Queue.h. The following functions should be included:
    void enqueue(int item, Node* queueHeader) Add new item to the end of the queue
    int dequeue(Node** queueHeader) Return and remove the first item
    bool isEmptyQueue(Node* queueHeader) Return true if the queue is empty
    void deleteAll(Node** queueHeader) Make the queue empty
    int queueSize(Node* queueHeader) Return the size of the queue (number of nodes)
    void printQueue(Node* queueHeader) Print all values in the correct order
    At first, assume that the data to be stored in the queue are all integers.

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Read this.

    To be slightly more blunt do your own homework
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    The larch
    Join Date
    May 2006
    Posts
    3,573
    Implement a queue in C++ using structures and pointers only the same way as we did for List and
    Stack.
    If you implemented those, then you already essentially have the queue.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Popular pages Recent additions subscribe to a feed