selecting input from a floppy

This is a discussion on selecting input from a floppy within the C++ Programming forums, part of the General Programming Boards category; how do you select what line of code you want to use as input to a program if you have ...

  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, 02:59 AM
  2. Input statement problem
    By une in forum C Programming
    Replies: 3
    Last Post: 05-30-2007, 12:16 AM
  3. For loop problems, input please.
    By xIcyx in forum C Programming
    Replies: 2
    Last Post: 04-22-2007, 04: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, 04:42 PM

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