Is there a 24-bit var in C++?
Is there a 24-bit var in C++?
int a; don't make a program without it.
thanks it's 3 bytes but i can't figerout how to use it.
I tried to use it like this foo=0; and i get the error
error C2440: '=' : cannot convert from 'const int' to 'unsigned char [3]'
There are no conversions to array types, although there are conversions to references or pointers to arrays
how can i fix this?
you just do:
foo poo;
poo.myvar
it will have all the proper operations defined for it.
EDIT: That would, of course, be for the bitfield, not the array. There is no direct way to use the array version.
Last edited by Polymorphic OOP; 04-06-2003 at 03:18 AM.
That was weird it used my friends name. He logged in once on my pc and about a month or so but it shouldn't do that
int a; don't make a program without it.
no wait it get the error:
error C2228: left of '.myvar' must have class/struct/union type
from doing
foo.myvar=0;
int a; don't make a program without it.
it acts like a 24bit but it takes 4bytes can this be fixed?
I do sizeof(poo); and it gets 4 if i do
sizeof(poo.myvar) i get the error
error C2070: illegal sizeof operand
int a; don't make a program without it.
ya i got VC++ that sucks
int a; don't make a program without it.
I just wanted to see if it was possable and wanted to save some space in ram if i only need to go 16 million. I also wanted to save some space in files but i could just make a fuction to do that my self.
int a; don't make a program without it.