delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/26/03:39:05

Message-ID: <3402832A.81AF2D5A@bspu.ac.by>
Date: Tue, 26 Aug 1997 10:18:02 +0300
From: Alexander Bokovoy <bokovoy AT bspu DOT ac DOT by>
Organization: BSPU named after Maxim Tank
MIME-Version: 1.0
To: frolikcc AT indy DOT net
CC: djgpp AT delorie DOT com
Subject: Re: SIGSEGV or SIGABRT during execution

Chris Frolik wrote:
> 
> strlen() returns the length of a string _without_ the null terminating
> character.  Try changing the line as follows:
> 
>       KeyWord=new char[strlen(keyword)+1];
> 
> And see if it works.  BTW, although variable names are case sensitive,
> it is less confusing to use names that are spelled differently, rather
> than KeyWord and keyword.
> 
I tried this variant also but nothing changes. It seems to review all
pieces of code. And about names conventions: as you see in original
message, keyword is a formal parameter in constructor and is used only
in this strict context but KeyWord is a class data member. This name
convention will helps to you when you do not have original source but
see only headers.
-- 
Alexander Bokovoy, <bokovoy AT bspu DOT ac DOT by>
---== The Soft Age coming soon ==---

- Raw text -


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