delorie.com/archives/browse.cgi | search |
From: | jason_hsu AT my-deja DOT com |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: SIGSEGV error when reading a file into an array |
Date: | Sun, 02 Jul 2000 21:13:17 GMT |
Organization: | Deja.com - Before you buy. |
Lines: | 23 |
Message-ID: | <8job93$a3h$1@nnrp1.deja.com> |
References: | <8jm69n$tj0$1 AT nnrp1 DOT deja DOT com> <9bM75.81426$NF5 DOT 1365696 AT afrodite DOT telenet-ops DOT be> |
NNTP-Posting-Host: | 24.18.171.165 |
X-Article-Creation-Date: | Sun Jul 02 21:13:17 2000 GMT |
X-Http-User-Agent: | Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) |
X-Http-Proxy: | 1.1 x52.deja.com:80 (Squid/1.1.22) for client 24.18.171.165 |
X-MyDeja-Info: | XMYDJUIDjason_hsu |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
In article <9bM75.81426$NF5 DOT 1365696 AT afrodite DOT telenet-ops DOT be>, "Tim \"Zastai\" Van Holder" <zastai AT hotmail DOT com> wrote: <<From what I can see, you're using indices starting from 1, while in C arrays start at index 0. So when you try to enter data from the last row/column into the array, you write into unallocated memory, which generally triggers a SIGSEGV.>> This isn't the issue. I tried expanding the array to 1000x1000, but the problem remained and actually showed up sooner when running the program. How does one prevent SIGSEGV errors? I'm surprised the FAQ doesn't make this clearer. -- Jason Hsu, KB9PNZ jason_hsu AT apexmail DOT com http://www.bigfoot.com/~jason_hsu/ Sent via Deja.com http://www.deja.com/ Before you buy.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |