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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/21/04 23:30
Read: times


 
#70901 - RE: Another stringy problem
Responding to: ???'s previous message
i want to pass it the address of a string and a control bit so i call it with foo(string_name,1) am I correct in thinking that this will actually pass &string_name,1 as string name and &string_name are one and the same thing?

No.

If string_name is declared:
    int string_name;
you would use foo(&string_name, 1) so foo()'s str parameter points to string_name.

If string_name is declared:
    int string_name[n];
you would use foo(string_name, 1) so foo()'s str parameter points to string_name[0].

FWIW, convention suggests that a "string" is a NUL-terminated character string (i.e., an array of characters), not an array of integers.


List of 6 messages in thread
TopicAuthorDate
Another stringy problem            01/01/70 00:00      
   RE: Another stringy problem            01/01/70 00:00      
      RE: Another stringy problem            01/01/70 00:00      
         RE: Another stringy problem            01/01/70 00:00      
         RE: Another stringy problem            01/01/70 00:00      
   RE: Another stringy problem            01/01/70 00:00      

Back to Subject List