fseek question regarding line number

This is a discussion on fseek question regarding line number within the C Programming forums, part of the General Programming Boards category; I'm using fseek in a program to get to specific offsets in a text file. Is there a way to ...

  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,185
    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, 05:04 AM
  5. Validating the contents of a char buffer
    By mattz in forum C Programming
    Replies: 3
    Last Post: 12-09-2001, 05:21 PM

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