Thread: program for a printere queue. Linked list implementation help.

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    12

    program for a printere queue. Linked list implementation help.

    Ok so i have a program that reads in data from a file. The file has the time someone sends a a file to a printer to be printed and the amount of pages.

    I understand I have to use queues to organize data and add it in. my question is how exactly do I start with reading in the file data. Do I read it into a linked list, then fill the queue from there? Or do I read the file and put in into a queue directly. I am a little stuck and confused;/ Thanks for the help

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    All good questions. How about writing out in words what to do first before turning it into code or pseudo-code. Take this fine example of tic tac toe:
    Code:
    make a board
    make x player and o player
    decide active player
    each turn do this
        show board
        ask for a move and make sure it's good
        do move for player
        exit if they won otherwise switch players
    There. There's how you play tic-tac-toe, in words, without any functions that actually do anything. Now I can break each step into smaller or more detailed steps of what they need to do. You should do something similar, so you understand what your program should be doing. Then start thinking about actually turning it into code.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. One more linked list implementation
    By BlackOps in forum C Programming
    Replies: 17
    Last Post: 07-16-2009, 09:34 PM
  2. Linked List implementation
    By jcarouth in forum C Programming
    Replies: 4
    Last Post: 10-05-2005, 10:47 PM
  3. Linked List Queue Implementation help
    By Kenogu Labz in forum C++ Programming
    Replies: 8
    Last Post: 09-21-2005, 10:14 AM
  4. Linked List implementation of Queue
    By tdm2792 in forum C Programming
    Replies: 5
    Last Post: 11-04-2001, 04:04 PM
  5. queue linked implementation
    By technoXavage in forum C++ Programming
    Replies: 1
    Last Post: 10-03-2001, 04:29 PM