Queue

This is a discussion on Queue within the C++ Programming forums, part of the General Programming Boards category; How do you build a queue class which uses an integer data member 'count' that stores the number of elements ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    10

    Question Queue

    How do you build a queue class which uses an integer data member 'count' that stores the number of elements currently in the queue to distinguish between a queue-full and a queue-empty condition instead of keeping an empty slot between the front and the back elements.

    Thanks.

  2. #2
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    Didn't your professor explain this already, before he gave the assignment?
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  3. #3
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    I think the real question here is...

    How dont you build a queue class which uses an integer data member 'count' that stores the number of elements currently in the queue to distinguish between a queue-full and a queue-empty condition instead of keeping an empty slot between the front and the back elements.

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, 02: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, 08:38 AM

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