sneak peek of next line in file

This is a discussion on sneak peek of next line in file within the C Programming forums, part of the General Programming Boards category; Hi i fopen() a text file and use fgets(). Is there a function to peek into what the next line ...

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    31

    sneak peek of next line in file

    Hi

    i fopen() a text file and use fgets(). Is there a function to peek into what the next line contains without actually drawing out the line ?

  2. #2
    cwr
    cwr is offline
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    869
    Not really, but you could always read the next line, then use fseek() to go back to where you were before if that's what you want to do.

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    31
    thanks... i did the fseek backwards and that works.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 01:53 AM
  4. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 08:39 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM

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