Thread: fseek question regarding line number

  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    1

    fseek question regarding line number

    I'm using fseek in a program to get to specific offsets in a text file.

    Is there a way to get the line number I end up at when I do an fseek?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Only if you process all the characters you skipped.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Imposing Line Numbers automatically in the C code
    By cavestine in forum C Programming
    Replies: 14
    Last Post: 10-15-2007, 12:41 AM
  2. Question about parsing a string from a line
    By edd1986 in forum C Programming
    Replies: 2
    Last Post: 04-23-2005, 03:18 PM
  3. Command Line Question
    By Sebastiani in forum C++ Programming
    Replies: 5
    Last Post: 07-09-2002, 01:46 AM
  4. Greenhand want help!
    By leereg in forum C Programming
    Replies: 6
    Last Post: 01-29-2002, 06:04 AM
  5. Validating the contents of a char buffer
    By mattz in forum C Programming
    Replies: 3
    Last Post: 12-09-2001, 06:21 PM