typeless data [structures]
- From: "Rob" <iouswuoibev@xxxxxxxxxxx>
- Date: 30 May 2005 17:26:03 -0700
I seek to be able to store data in a static variable that has no
specifically defined type/size. Or to put it another way, I wish to
create a structure of data but without the ability to reference its
subcomponents until I cast it to another predefined type.
In my attempts of doing this (I don't know if it is even possible), I
encountered a feature of some sort that seems to be legal, but yet I
don't know what it does. It involves inserting a type followed by a
colon followed by a constant. Here's an example:
struct {
int : 0;
long : 5;
short : 2;
} s;
What does this do? Does it have anything to do with the functionality I
am after? When I attempted to cast this struct it wouldn't allow me to;
it gave the error "cannot convert from '' to <type_name>".
.
- Follow-Ups:
- Re: typeless data [structures]
- From: SM Ryan
- Re: typeless data [structures]
- From: Lew Pitcher
- Re: typeless data [structures]
- Prev by Date: Re: sscanf and int64 in Win32 and Unix - different results?
- Next by Date: Re: Translating Free Pascal to GNU C
- Previous by thread: Re: Translating Free Pascal to GNU C
- Next by thread: Re: typeless data [structures]
- Index(es):