home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 14
/
CD_ASCQ_14_0694.iso
/
maj
/
653
/
cast.h
< prev
next >
Wrap
Text File
|
1994-04-03
|
1KB
|
24 lines
/*
** public domain demo by Bob Stout
*/
#define CAST(new_type,old_object) (*((new_type *)&old_object))
#if 0
*************************************************************************
* *
* /* Example of CAST macro at work */ *
* *
* union { *
* char ch[4]; *
* int i[2]; *
* } my_union; *
* *
* long longvar; *
* *
* longvar = (long)my_union; /* Illegal cast */ *
* longvar = CAST(long, my_union); /* Legal cast */ *
* *
*************************************************************************
#endif /* 0 */