Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] runtime error for c++ prog


On Thu, Oct 31, 2002 at 12:16:02AM +1100, Bart s wrote:
> From: "Bart s" <bartons72@xxxxxxxxxxx>
> To: slug@xxxxxxxxxxx
> Subject: [SLUG] runtime error for c++ prog
> Date: Thu, 31 Oct 2002 00:16:02 +1100
> 
> Hello all. My name's Bart. I use Red Hat Linux 7.1 when writing & compiling 
> c++ programs. I'm a novice to c++ and Linux. Basically,I've written a 
> program which writes one-dimentional character arrays to the hard drive and 
> reads them back from it for display, when indicated by the user. It 
> compiles and when it runs, the files on the hard drive are written 
> correctly. However, when attempting to read fron those files, the program 
> crashes and the following message is displayed: "Segmentation fault (core 
> dumped)". I believe that the core is the Linux kernel and I guess that this 
> message comes from the operating system. I was wondering if anybody could 
> tell me what a segmentation fault is and suggest what sort of thing could 
> be wrong with my program.


compile it with -g to turn on debugging symbols then run 'gdb
progname'.. info gdb on how to use it.
-- 
  .''`.	    Mike C Alonzo		"We are each entitled to our own 
 : :' :	    jmalonzo@xxxxxxxxxxxx	opinion,  but no one is entitled 
 `. `'	    				to his own facts."
   `-	    <http://dotdeb.150m.com>	             -- Patrick Moynihan

Attachment: pgpi1ZOzqv0il.pgp
Description: PGP signature