Page 2 of 2

Posted: Fri Feb 01, 2008 2:27 am
by Solar
piranha wrote:Well, I said that is a post where the code didn't use a "..." string.
Yes, and that is why you have to add a '\0' to the end of it. I was expressing my surprise at this surprising you.
Plus appending a \0 character to the array I used worked.
Of course. What I meant is that you don't have to do that array thing with '\0' appending, because "..." does that automatically for you - with the difference that character constants end up in .data, string constants in .rodata.

Posted: Fri Feb 01, 2008 9:44 am
by piranha
A \0 character is appended automatically when you use "...". A C coder of some repute should know that.
and
piranha wrote:
Well, I said that is a post where the code didn't use a "..." string.


Yes, and that is why you have to add a '\0' to the end of it. I was expressing my surprise at this surprising you.
Seem like 2 different thing.
It didn't surprise me. I just said thats what I had to do. I didn't say "Woah" or anything.

-JL