Miles Bader writes:
> If you're using C++ and are willing to use gcc (and clang) extensions,
> you can do a bit better, e.g.:
>
>class __attribute__((packed)) int24_t
>{
>public:
> operator int () const { return b; }
> int24_t (int v) : b (v) {}
> int24_t () {}
>pri
If you're using C++ and are willing to use gcc (and clang) extensions,
you can do a bit better, e.g.:
class __attribute__((packed)) int24_t
{
public:
operator int () const { return b; }
int24_t (int v) : b (v) {}
int24_t () {}
private:
int b : 24;
};
Then an arr
On Wed, Jun 05, 2013 at 01:49:28PM -0400, Ed Smith-Rowland wrote:
> On 06/05/2013 10:43 AM, kuldeep dhaka wrote:
> >Hello,
> >
> >while working on a program i faced a problem.
> >i need only 20 bit , and having a 32 bit only waste more memory(12
> >byte), 24bit would much be better.
> >i need a uin
On 06/05/2013 10:43 AM, kuldeep dhaka wrote:
Hello,
while working on a program i faced a problem.
i need only 20 bit , and having a 32 bit only waste more memory(12
byte), 24bit would much be better.
i need a uint24_t variable but gcc dont support it so i have to start
with uint32_t.
it would be