how do i make a pointer point to the pointer's pos on a ifstream object?

This is a discussion on how do i make a pointer point to the pointer's pos on a ifstream object? within the C++ Programming forums, part of the General Programming Boards category; hiya, ifstream fin("data.dat"); fin.seekg(20, ios::beg); now fin's poitner is on the 20th position, but i'd like to use another pointer ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    142

    how do i make a pointer point to the pointer's pos on a ifstream object?

    hiya,

    ifstream fin("data.dat");

    fin.seekg(20, ios::beg);
    now fin's poitner is on the 20th position,

    but i'd like to use another pointer to point to this position? how?
    is there a getpointerposition something in the ifstream class? or do i just cast it? ie,

    unsigned char *pData = &fin?

    many thanks!

  2. #2
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    I think you should use something like: char **
    but I'm not sure

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    142
    and uh point it ot the ifstream object?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. For the numerical recipes in C types!
    By Smattacus in forum C Programming
    Replies: 5
    Last Post: 10-28-2008, 08:57 PM
  2. rotating around object (looat)
    By jabka in forum Game Programming
    Replies: 13
    Last Post: 06-18-2008, 06:02 PM
  3. Question on l-values.
    By Hulag in forum C++ Programming
    Replies: 6
    Last Post: 10-13-2005, 05:33 PM
  4. Replies: 2
    Last Post: 01-29-2003, 03:32 PM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 02:27 PM

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