Thread: Textfile Pointers

  1. #16
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Originally posted by shaik786


    fseek(fp, -1, SEEK_CUR);
    As lambs4 said, that's a nice way of going about it.
    Almost If your reading backwards using this method, you'll need to fseek back 2 bytes not 1. This is because when you do a read, it moves the pointer forward by 1, therefore you must hop 2 back to point at the character you want to read next.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  2. #17
    Registered User
    Join Date
    Jul 2002
    Posts
    28
    Thanx for all your help guys got it all sorted :-)

    Now I feel like programming something else but nothing to hard

    Thanx again
    Cheers

    Bazza

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using pointers to pointers
    By steve1_rm in forum C Programming
    Replies: 18
    Last Post: 05-29-2008, 05:59 AM
  2. function pointers
    By benhaldor in forum C Programming
    Replies: 4
    Last Post: 08-19-2007, 10:56 AM
  3. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  4. Staticly Bound Member Function Pointers
    By Polymorphic OOP in forum C++ Programming
    Replies: 29
    Last Post: 11-28-2002, 01:18 PM