From: John Furlong Newsgroups: comp.os.msdos.djgpp Subject: Program fails when the size of an array of struct is increased. Date: Wed, 14 Oct 1998 19:04:11 +0100 Organization: John Furlong Lines: 51 Message-ID: <3624E79B.4A34529@worldhq.com> NNTP-Posting-Host: ns2.saturn.ispc.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news3.cableinet.co.uk 908388211 7416 212.46.128.2 (14 Oct 1998 18:03:31 GMT) X-Complaints-To: abuse AT cableinet DOT net NNTP-Posting-Date: 14 Oct 1998 18:03:31 GMT X-Mailer: Mozilla 4.05 [en] (WinNT; I) Cache-Post-Path: ns2.saturn.ispc.net!unknown AT p020 DOT 5399-2 DOT saturn DOT ispc DOT net X-Cache: nntpcache 2.3.2 (see http://www.nntpcache.org/) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi folks, Really hopeing someone will look at this and give me some clues as to where to start looking as I'm Stuck. I have some code that compiles/runs fine under NT and 95. Trouble is I want it to run under DOS (It's a shop till system). I have this structure defined :- typedef struct { char product[PRODUCT_LEN]; int stock ; int price ; char bar[BAR]; int active ; int quantity ; char vat_code ; } SellRecord ; When I define an array of this structure I find I can can define an array of up to 6 and everything runs fine. If I define the array with a size of anything greater the program fails with this error message :- Exiting due to signal SIGSEGV Page fault at eip=00004023, error=0006 It looks like memory to me, which would explain why it runs under NT/95 but not dos, but I'm danged if I can work out what to do next. This is running under Caldera DR-Dos 7, but I have the same problems with MS Dos. Any help would be really appreciated. Thanks, John. -- +------------------------------------------------------------+ John Furlong. Leighton Buzzard, Bedfordshire, UK. email jfurlong AT worldhq DOT com