Reference counting is covered in the FAQ, if you want to know.
Sorry, the C++ doesn't know about FAQ or reference counting. ;-)
How is this a _bitmap_? All you showed is how to create a dynamic
array of floats.
How that is not a _bitmap_ ?
The de-facto convention to store 2D matrix is to use a linear array as
storage. This was a suggestion, if it does not fit the original poster's
criteria he can give more information and if it drifts too much away from
C++, I will re-evaluate the situation.
So, after answering this OT question (and thus encouraging OT posts),
the next question you're going to get is "how do I put it on the
screen?"
I gave C++ code for one (very common) way to store floating-point grayscale
bitmap in memory, that is not very platform specific question. He specificly
asked how to do this in C++, I answered how to do that in C++. If he wants
to "put the bitmap in to the screen", that requires platform specific
information and for that I will gladly redirect him.
Are you prepared to go all the way?
Sure, why not? I would put the floating-point bitmap "on the screen" using
DirectX 9.0c or OpenGL 1.5, depending on the platform and availability of
these libraries. If neither of these is option then I will re-evaluate the
approach depending on the available choises.
Great, but then don't be so smug about it, because that was what prompted me
to 'help' the original poster in the first place. Stay professional if
that's what you expect the quality of the conversation to be.
And neither are many folks here.
My point wasn't to help with graphics programming per-se, that is off-topic
and I agree with that. C++ _language_ (the subject of this newsgroup) does
not define any "bitmaps", true, but if someone did ask: "what would be a
reasonable approach to store 2D matrix of floating-point values", you nor
many folks here wouldn't find a problem to give a beginner a kickstart into
the right direction, like I did with the very basic "bitmap" class. I don't
think the way I answered the question was graphics programming related in a
big way or that it was off-topic in a very distractive manner. Chill out,
maybe ignore me, I don't care but I definitely am not going to be your
puppet: I will use my own initiative to consider when I reply and who I
reply to and you are free to do the same.