🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.linux
Article #56117

Re: Memory Allocation Problems

#56117
From: Dan
Date: Wed, 09 Apr 1997 00:00
14 lines
1232 bytes
Dimitri Maziuk (dima@eris.dev.null) wrote:
: Ah.  Do you declare the string as char * or as char[] ?
: IIRC gcc treats char * strings as constants, or something 
: like that -- see the -fwritable-strings option in gcc manpage.
: If that's the case, try using char arrays instead of pointers.
: BTW I think there's also string class in libg++ (or was libstdc++ ?)
: 
Found the final problem. There was several segmentation faults that I did
not know about, and there was the problem where I was copying a char[3]
with three characters, and no terminating char, into something else
without really thinking about it.

Thanks, Dan.
Technical Details
Message-ID: <5ih1cm$js0$2@gruvel.une.edu.au>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <5iareb$i91$1@gruvel.une.edu.au> <33492BEA.830839C@eris.dev.null> <5ibtd0$13m$1@gruvel.une.edu.au> <334b85d5.0@news.topend.com.au> <5if39k$69k$1@gruvel.une.edu.au> <334BDCA4.1B8E8C8C@eris.dev.null>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 102983,b7f2caa39b1617c0
X-Google-Attributes: gid102983,public
From: dbentley@metz.une.edu.au (Dan)
Subject: Re: Memory Allocation Problems
Date: 1997/04/09
Message-ID: <5ih1cm$js0$2@gruvel.une.edu.au>
X-Deja-AN: 231889999
References: <5iareb$i91$1@gruvel.une.edu.au> <33492BEA.830839C@eris.dev.null> <5ibtd0$13m$1@gruvel.une.edu.au> <334b85d5.0@news.topend.com.au> <5if39k$69k$1@gruvel.une.edu.au> <334BDCA4.1B8E8C8C@eris.dev.null>
Organization: University of New England, NSW, Australia
Newsgroups: aus.computers.linux