|
-
May 26th, 2010, 06:47 PM
#4
Re: can't get 10 simple lines to work right
Did you try reading your file in hex mode to see just what you should be seing?
AFAIK, a lot of bitmap files per-pixel pad to 4 bytes (rather than per row). You may want to double check your file using an external hex editor.
You could also try something simpler: Forget everything about bitmaps, and imagine your file is just plain raw data. Try to read that and print the values. Your success (or failure) of achieving this should give you a good idea of where you went wrong.
Is your question related to IO?
Read this C++ FAQ article at parashift by Marshall Cline. In particular points 1-6.
It will explain how to correctly deal with IO, how to validate input, and why you shouldn't count on "while(!in.eof())". And it always makes for excellent reading.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|