Mail Archives: djgpp/1998/02/10/13:14:23
"Eric" <ericfingerhut AT mindspring DOT com> wrote:
> 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.
Eric you must be a little more specific, what's "the receiving function"?
And I think your string is Bill\0Clinton\0 because spaces NEVER end strings.
Additionally you must know that in C doesn't mather if you declare "mystring"
as a 50 or 10000000 elements array, the string will ever end in the first \0.
Please try to explain your problem better and if possible provide a little
example.
SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013
- Raw text -