CrazYmonkeY159
Expert Member
- Joined
- Sep 13, 2007
- Messages
- 2,142
Hi guys
for a school assignment i have to read in the binary data block contained in a .pgm file using c++
i know how to read in the whole .pgm using read() with a file stream object;
if you dont know a pgm is structured like this
----------------
PN (where N is a number)
# Comment
# Comment
Int Int
Int
_binary data block_
------------------
how do i read in the 1st two Integers and the binary data block? ive been struggling on this one for days
for a school assignment i have to read in the binary data block contained in a .pgm file using c++
i know how to read in the whole .pgm using read() with a file stream object;
if you dont know a pgm is structured like this
----------------
PN (where N is a number)
# Comment
# Comment
Int Int
Int
_binary data block_
------------------
how do i read in the 1st two Integers and the binary data block? ive been struggling on this one for days