Set file pointer 
Author Message
 Set file pointer

Hi,

ifstream fp("package.pak", ios::binary);

when I open a file like this, how do I set the file pointer to a specified
position or (if not possible) read a specified number of bytes starting from
a specified byte?

--
Magnus Hult



Sat, 29 Jun 2002 03:00:00 GMT  
 Set file pointer


Quote:
> Hi,

> ifstream fp("package.pak", ios::binary);

> when I open a file like this, how do I set the file pointer to a
specified
> position or (if not possible) read a specified number of bytes
starting from
> a specified byte?

> --
> Magnus Hult


See these methods:
seekp
seekg

Also read the Frequently Asked Questions, which is referenced in:
http://www.slack.net/~shiva/welcome.txt

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 30 Jun 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. --How to set a exe file in Debug Tab of Project setting--

2. How do set a exe File in Debug Tab of Project setting dynamically

3. Trying to set .SQC files as a dependencies of .C files in Developer Studio

4. How to set up filter for files without file extention

5. Help setting specific file types in the Open File Dialog of my SDI

6. How to set file-types in Doc/View File dialogs

7. How to set up filter for files without file extention

8. Dereferencing f-pointers, arrays of f-pointers, pointers to f-pointers

9. file pointer at end of file?

10. Setting a pointer to a function, inside a function

11. pointers to function set at compilation time!!

12. Setting a function pointer

 

 
Powered by phpBB® Forum Software