Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/13/08 23:31
Read: times


 
#156677 - 'temp' holds an address, not the char array.
Responding to: ???'s previous message
Robert Revens said:
Presumably my

char* data temp;

was only storing the pointer in data memory, not temp?

That line alone was allocating 'data' storage for a generic (3-byte) pointer named 'temp'. A subsequent statement assigned 'temp' the address in code memory where the string literal "Test1" is stored.

List of 6 messages in thread
TopicAuthorDate
Confused by strcopy - C newb.            01/01/70 00:00      
   ... the disassembly            01/01/70 00:00      
      strcpy to a location in code memory            01/01/70 00:00      
   String literals in program memory.            01/01/70 00:00      
      Thank you both...            01/01/70 00:00      
         'temp' holds an address, not the char array.            01/01/70 00:00      

Back to Subject List