home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!spool.mu.edu!agate!dog.ee.lbl.gov!news!vela!pd-dom!agrafiot
- From: agrafiot@wl.com (Dimitris Agrafiotis)
- Subject: question on casting unions
- Message-ID: <1993Jan6.160258.25389@wl.com>
- Sender: agrafiot@wl.com (Dimitris Agrafiotis)
- Organization: Warner Lambert / Parke-Davis
- Distribution: usa
- Date: Wed, 6 Jan 1993 16:02:58 GMT
- Lines: 19
-
-
- I have the following question regarding unions. Assume that 'un' is defined
- as follows:
-
- union
- {
- char a;
- long b;
- }
- un;
-
- Can one refer to un.a and un.b by ((char) un) and ((long) un), respectively?
- Thanks
-
- --
- Dimitris K. Agrafiotis
- Computer Assisted Drug Design
- Parke-Davis Pharmaceutical Research
- (agrafiot@wl.com)
-