www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/11/03:45:22

From: G DOT DegliEsposti AT ads DOT it
To: djgpp AT delorie DOT com
Message-ID: <C12565A8.002FAF75.00@vega.ads.it>
Date: Wed, 11 Feb 1998 09:44:52 +0100
Subject: Re: Re: compiler interpreting a blank as being '\0' - HELP!
Mime-Version: 1.0




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


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