www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/10/13:14:23

Message-Id: <m0y2EXg-000S2lC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: "Eric" <ericfingerhut AT mindspring DOT com>, djgpp AT delorie DOT com
Date: Tue, 10 Feb 1998 15:19:54 +0000
MIME-Version: 1.0
Subject: Re: compiler interpreting a blank as being '\0' - HELP!
In-reply-to: <6bq1g4$55n@camel18.mindspring.com>

"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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019