|
-
November 8th, 2010, 10:47 PM
#8
Re: C++ bitmap - why?
Palette doesn't get used ever again after this code, but still gets applied to the image when compiled and ran?
Your right. "That could mean anything from a pointer to this palette not being referenced anymore, to some loop that gets only done once, to who knows whatever. We are not mind readers or psychic."
But, let's think it through for a moment:
I give you a subject (palette), and I tell you it (palette) is never used again after this code. So, whether palette is a reference or pointer, it isn't used anymore.
I don't have an integer in the code to indicate a loop. And, I told you it's not used ever again after this code, so it won't be used in a for loop anywhere. Even if there is a loop before the 2 lines, palette would still need to be used after the code somewhere (EDIT: to set bitmapInfo.bmiColors = to palette, e.g.), whether a pointer or reference. But, then again, I say its not used again after this code; so nope, no for loop, no pointer, no reference.
I only post 2 lines; you should expect these 2 lines to be the only 2 lines relevant. (Tho it still has nothing to do with my code at all)
So, you have 30yrs of programming experience, but don't have analytical skills or grammar skills (context clues)?
Last edited by zaryk; November 8th, 2010 at 11:10 PM.
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
|