Queue

This is a discussion on Queue within the C++ Programming forums, part of the General Programming Boards category; Does anyone know how one would be able to have a program show the movement through a line shuch as ...

  1. #1
    Unregistered
    Guest

    Unhappy Queue

    Does anyone know how one would be able to have a program show the movement through a line shuch as in a supermarket line. while going through the progam it would need an input from the user giving the % chance of a person adding to the line. It would also need to count how many cycles the program went through before some one was removed from the line. if the line reaches a specific amount of people then there should be another line opened.

    if you can help email ma at littlgurl@hotmail.com

    ~Thanks Bunches~

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    > how one would be able to have a program show the movement through a line shuch as in a supermarket line

    Use a queue.

    > It would also need to count how many cycles the program went through before some one was removed from the line

    int cycles = 0;
    while(foo){
    //stuff
    cycles++;
    }

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