please help me

This is a discussion on please help me within the C++ Programming forums, part of the General Programming Boards category; Implement a queue in C++ using structures and pointers only the same way as we did for List and Stack. ...

  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,163
    Read this.

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

  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21