Hi,
A simple unformatted IO question (I am sure the answer must be simple).
How do I read a file of unformatted integers one by one, in a do loop?
That is, this is a grayscale image where the pixel values (0-256,
unsigned char's in C) are stored in one file without any spaces or
newlines or such. I want to avoid reading them all at once into an
array (it is a large file), and don't know how to do "nonadvancing"
unformatted input. I know that I have to take care of unsigned/signed
conversion myself.
Thanks,
Aleksandar
--
__________________________________
Aleksandar Donev
Complex Materials Theory Group (http://cherrypit.princeton.edu/)
Princeton Materials Institute &
Program in Applied and Computational Mathematics
@ Princeton University
Address:
419 Bowen Hall, 70 Prospect Avenue
Princeton University
Princeton, NJ 08540-5211
E-mail: [log in to unmask]
WWW: http://atom.princeton.edu/donev
Phone: (609) 258-2775
Fax: (609) 258-6878
__________________________________
|