TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: CHRIS DOWNS
from: FRANK MASINGILL
date: 1997-08-06 08:26:00
subject: Ascertaining address

 FM> How does one get a program to get the ADDRESS of a char?  I
 FM> can do it readily with an int.
 CD> It works the same way for a char as for an int.
 CD> int i; int *p = &i;
 CD> char c; char* q = &c;
  snip
        Thanks, Chris.  I'll try that.  Now I have another problem
encountered while playing with this.
        I found that I COULD bring up the addresses of elements of a
character array but then at the same time I tested something else I
had heard was true - that the external variables went on the heap
while the internal ones went on the stack.  But I found that these
array element addresses were numbered downward just like the
addresses of my internal variables, declared within main().
        What am I not seeing here?
Sincerely, 
                                     Frank
                                                                              
                                                       
      
--- PPoint 2.03
---------------
* Origin: Maybe in 5,000 years - frankmas@juno.com (1:396/45.12)

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™.