From: "Eric J. Whitney" Newsgroups: comp.os.msdos.djgpp Subject: This should run fine... but doesn't ?? Arrrggghhh!! Date: Thu, 02 Apr 1998 13:53:39 +1000 Organization: The University of Sydney, NSW, Australia Lines: 47 Distribution: inet Message-ID: <35230BC3.1615308F@hydra12.ae.su.oz.au> NNTP-Posting-Host: kgz.inthouse.usyd.edu.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi folks.... thought I'd bother you all with a problem I've been having for some time. I have a C++ program, which #includes my own Array and Matrix template classes. These work by using one pointer which points to the top of the data. They also have various associated exception classes which they can throw. The main program initialises one instance say: Matrix myMatrix(3, 3); Then there is a second instance ie: Matrix mySecondMatrix(3, 3); which appears further down the program listing ie: Matrix myMatrix(3, 3); ..... Do some stuff here ..... Matrix mySecondMatrix(3, 3); ... More stuff.... Now: This compiles & links fine in DJGPP C++ using RHIDE. but when I run it it gives me a "program exit code 255" followed by all this stuff: Call frame traceback: In function free+14 In function __builtin_delete+16 In functon __builtin_vec_delete+11 es.cpp(153) in function SetSize_t5Array1ZfUs es.cpp(17) in function __t5Array1ZfUs es.cpp(142) in function main in function __crt1_startup+138 What have I done wrong??? It runs fine with one instance of the Matrix, but for two, it crashes!!! I have stepped through it using F8 and it always crashes right where the second matrix is initialised. HELP! -- Eric "The Wingnut" Whitney