X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Tue, 1 Jun 2004 23:08:18 +0200 From: Egon Eckert To: djgpp AT delorie DOT com Subject: Re: "delete" crash Message-ID: <20040601210818.GC9423@chance.cz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > "new". If anyone is eager to help me, here is the source I doubt the problem lies in DJGPP, but I see more of them in your GString class. So we are off-topic here... I would suggest at least: - add a copy constructor, ie. "GString::GString(const GString& other)" - be careful to avoid calling strcpy() on overlapping strings, the good practice is to check "if (this != &strFrom) ..." in the assignment operator - the assignment operator itself should IMHO take "const GString&" instead of "const GString" - check bounds in "operator[]" to prevent overwriting memory past the pString etc. In short, "back to the drawing table". :-) -- Egon Eckert, Heaven Industries, s.r.o. E-mail: egon AT heaven DOT industries DOT cz Never be afraid to try something new. Remember, amateurs built the ark; professionals built the Titanic. -- Anonymous