Article View: comp.unix.programmer
Article #3444Re: Displaying addresses of variables in hex?
From: Rohan Lenard
Date: Sun, 17 Nov 1996 00:00
Date: Sun, 17 Nov 1996 00:00
19 lines
1175 bytes
1175 bytes
In article <56m5ch$noi@news.iceonline.com>, Borg <vladimip@iceonline.com*> writes: :How do I display variable addresses in hex rather than in decimal? :An example: : : double var; : cout << "var value is " << var << " and its address is "; : cout << unsigned (&var) << endl; Try - cout << (void*)&var << endl; Rohan -- Rohan Lenard - rjl@wr.com.au rjl@ot.com.au rjl@triode.net.au +61-4-11250024 | All quotes can be attributed to my automated quote +61-2-99649633 | writing tool. Yours for just $19.95; and if you <gnu service provider> | call now you'll get a free set of steak knives ...
Technical Details
Message-ID:
<56nthr$9ov@hamlet.ot.com.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<56m5ch$noi@news.iceonline.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10ba33,7ec25c815d4734dc X-Google-Attributes: gid10ba33,public X-Google-Thread: fc89c,7ec25c815d4734dc X-Google-Attributes: gidfc89c,public From: rjl@ot.com.au (Rohan Lenard) Subject: Re: Displaying addresses of variables in hex? Date: 1996/11/17 Message-ID: <56nthr$9ov@hamlet.ot.com.au> X-Deja-AN: 197090142 references: <56m5ch$noi@news.iceonline.com> organization: Open Technology Pty. Ltd. Sydney, Australia reply-to: rjl@ot.com.au newsgroups: comp.unix.programmer,gnu.g++.help