Thread: selecting input from a floppy

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    8

    selecting input from a floppy

    how do you select what line of code you want to use as input to a program if you have an input stream connected to a floppy?

    what if it was the 3rd line in a floppy and you want to use it and nothing else from that floppy?

    what if you just wanted to use the last line and nothing else from the floppy?

    thanks in advance

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    It's handled like you were accessing a file on the hard drive. Once you associate a stream with the file, if the data format is predictable you can try using fseekg() to start at a specified distance from the start of the file (as measured in bytes). Alternately, if the data format isn't predictable, then you you need to read in and ignore things until you get to where you want.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. input redirection
    By sashaKap in forum C Programming
    Replies: 6
    Last Post: 06-25-2009, 01:59 AM
  2. Input statement problem
    By une in forum C Programming
    Replies: 3
    Last Post: 05-29-2007, 11:16 PM
  3. For loop problems, input please.
    By xIcyx in forum C Programming
    Replies: 2
    Last Post: 04-22-2007, 03:54 AM
  4. I would love some input on my BST tree.
    By StevenGarcia in forum C++ Programming
    Replies: 4
    Last Post: 01-15-2007, 01:22 AM
  5. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM