TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: FRANK MASINGILL
from: MATHIEU BOUCHARD
date: 1997-08-09 22:23:00
subject: Ascertaining address of a char

 FM>         How does one get a program to get the ADDRESS of a char?  I
 FM> can do it readily with an int.  If I assign char x - 'A' thought and
 FM> do a cout << &x I get an A followed by one of the early chars.
 FM>         What am I missing here?
&x is of type char*.
char* are written as strings
all others are written as pointer addresses.
solution:
cout << (void*)&x
matju
--- Terminate 4.00/Pro
---------------
* Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.