Thread: printing from my record buffer

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    30

    printing from my record buffer

    Hi i have my program that has a record buffer which holds 5 records. I want to print the content of that buffer or be able to print the whole file. how do you make it print this?

    thanks
    Kendals

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Code:
    ask user to pick to view the whole file, or just the buffer
    if answer == buffer
        read buffer full
        display buffer
    else
        while not end of file
            read buffer full from file
            display buffer
    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    30

    sorry print it to a computer printer

    Hi,

    My question was about printing it to a computer printer, can this be done? print what ever is in the record buffer to a computer printer and have an option to printing the whole data file to a printer.

    thanks
    Kendals

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Yes. Instead of writing to the screen, you write to a printer. Printers are treated like files. Your C book should tell you how to open files.

    Quzah.
    Last edited by quzah; 03-21-2002 at 07:37 PM.
    Hope is the first step on the road to disappointment.

  5. #5
    Registered User
    Join Date
    Feb 2002
    Posts
    30

    thanks

    Hi,

    Ill try it out. Im gonna have this in just incase the user or the program messed up.

    thanks

    Kendals
    Kendals

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  2. Print out a buffer
    By SwarfEye in forum C Programming
    Replies: 4
    Last Post: 09-08-2006, 09:32 AM
  3. writing a pack-style function, any advices?
    By isaac_s in forum C Programming
    Replies: 10
    Last Post: 07-08-2006, 08:09 PM
  4. buffer contents swapping
    By daluu in forum C++ Programming
    Replies: 7
    Last Post: 10-14-2004, 02:34 PM
  5. getline problem
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 10-06-2001, 09:28 AM