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

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: compiler interpreting a blank as being '\0' - HELP!
Date: Tue, 10 Feb 1998 20:08:29 -0800
Organization: Alcyone Systems
Lines: 23
Message-ID: <34E1243D.7B46ECC2@alcyone.com>
References: <6bq1g4$55n AT camel18 DOT mindspring DOT com>
NNTP-Posting-Host: 165.90.20.242
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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

Without more information, it's impossible to say.  We'd have to see the
offending function, and the data being passed to it.

The problem is probably that 1. the function doesn't handle spaces the
way you think it does, or 2. you aren't passing the function what you
think you're passing.

-- 
         Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
                       Alcyone Systems / http://www.alcyone.com/max/
  San Jose, California, United States / icbm://+37.20.07/-121.53.38
                                     \
                       "Life may be / the product of imperfections."
                                   / (Marclo Gleiser)

- Raw text -


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