Mail Archives: djgpp/1998/02/11/03:45:22
> When I try to pass a pointer to a string variable initialized as char
> mystring[50], the receiving function keeps on interpreting a space as
being
> the null terminator. So the string "Bill Clinton" is being handled as
just
> "Bill", but of course without a '\0' at the end.
What is the "receiving function"? Is it from you or from libc?
And then, where does the string come from? Does it come from an explicit
assignment
or is it the output from another function? If it is read from a file then
it could actually contain a '\0' while your editor shows a blank.
Please add more information, otherwise it is difficult to help you! :-)
ciao
Giacomo
- Raw text -