View Single Post
  #3 (permalink)  
Old September 25th, 2004, 03:00 PM
davekw7x davekw7x is offline
Authorized User
 
Join Date: Feb 2004
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To clarify: in your program, &c_x does not point to a c-style string. cout starts with the address of c_x and prints out characters until a '\0' is found. Different compilers may allocate local storage in different ways; since it is not possible for us to know where the next '\0' is located, the result is undefined (that is, anything could happen).

If you run the code that I suggested and have any questions: just ask.

Dave
Reply With Quote