delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/16/02:15:36

From: Matthew Moss <mmoss AT panix DOT com>
Subject: Re: "new" object creation problem
To: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP Mailing List)
Date: Sun, 16 Jan 1994 01:35:21 -0500 (EST)

Thanx for such a quick response. What everyone seemed to notice was that
when I tried to do:

	strcpy(_name,name)

I had forgotten to allocate space for the destination _name. After entering

	_name = new char[strlen(name)+1]

on the line before, everything went perfectly.

Thanks again.
-- 
+---------------------------+-------------------------------------------------+
| Matthew D Moss   :-p  ;-) | I tried to think of an extremely witty quote to |
| INTERNET: mmoss AT panix DOT com | put here. Unfortunately, there's no room left.  |
+---------------------------+-------------------------------------------------+

- Raw text -


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