![]() |
File manipultion
Hello,
I am a newbie at C++ and you will probably answer this question in seconds, but I would really like your help because I haven't found an answer to this on the internet. I would like to read specified bytes from a file and store these bytes in variables for further manipulation. The file I/O header does not contain such commands, but these manipulations are essential for the project I want to make. I would like to store 16 bytes in my variable. How is this possible? What is the command I can use? Thank you, Leslie |
Look into "Bignum" (or roll your own arithmetic, maybe using a class/struct). I've used 4-, 8-, and 16-bit processors. They worked.
|
If you just want to twiddle the bits (not do arithmetic on them) you can use iostream::read() to read in the number of bytes you want into a buffer and manipulate the contents of the buffer as needed.
|
| All times are GMT -5. The time now is 1:07 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC