c++ - What type for operations on pointers -
I have searched a lot, but nothing could be found useful - but then I am not sure that I am the right thing Search for
Is there a scalar defined by standard that should be bigger than at least one indicator? To wit. Sizeof (?) & Gt; = Sizeof (Zero *).
I need this because I am writing a small garbage collector and want something on the lines of this:
structure tag {uint32_t desc: sizeof (uint32_t) * 8-2; // To type the indicator UIT 32_t Free: 1; Uint32_t Symbol: 1; }; I think that is valid according to standard (if we are on it, I was quite surprised that sizeof (uint32_t) * 8-2 bitfield is valid for definition - but VS2010 Allows).
So what size_t does this requirement?
EDIT: After going ahead with some reasons for joining both C and C ++ (well and I thought they would be similar in that regard), I actually got one of them (I do not really need C ++ for this part of the code and I can add C and C ++ together that should work). And the CAM in this case seems to be the right standard from the answer.
You & lt; Stdint.h & gt; (or & lt; cstdint & gt; ) and use Since MSVC refuses to support the C99, you should & lt; Windows.h & gt; and use instead (see) (Also, please use instead of 8).
Comments
Post a Comment