Article View: comp.os.ms-windows.programmer.misc
Article #1822C++ problem with BC++ 3.1
From: Ed McCreary
Date: Tue, 08 Dec 1992 20:30
Date: Tue, 08 Dec 1992 20:30
36 lines
1813 bytes
1813 bytes
Hmmm, I've got a rather bizzare problem which I can't seem to figure out. I'm writing a MDI program with OWL which holds an image in the MDI children. Each child window is derived from TWindow. Now before I create the child window, I run a parsing function to extract information for the image file header. I need buffers to manipulate the header, so I did the following: char* buffer = new char[80]; ...code for parsing... delete [] buffer; When I use this code, I get a GPF in kernel.exe at the end of the child window constructor. Remember, the parsing code is executed before the child is created and is even in a different module. Also, this error does not occur every time. Sometimes, Windows will lock instead of giving a GPF, but this is rare. The problem disappears completely when I declare: char buffer[80]; instead at the top of the parsing function. I'd rather allocate the buffers dynamically, but I can't figure out why this fails. I'm new to C++ so maybe there's something I'm missing. Sigh, any ideas or helpful hints are appreciated. -- Ed McCreary ,__o mccreary@sword.eng.hou.compaq.com _-\_<, "If it were not for laughter, there would be no Tao." (*)/'(*)
Technical Details
Message-ID:
<1992Dec8.203056.29165@twisto.eng.hou.compaq.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!howland.reston.ans.net!usc!cs.utexas.edu!wotan.compaq.com!twisto.eng.hou.compaq.com!sword.eng.hou.compaq.com!mccrearyShow Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!europa.asd.contel.com!howland.reston.ans.net!usc!cs.utexas.edu!wotan.compaq.com!twisto.eng.hou.compaq.com!sword.eng.hou.compaq.com!mccreary From: mccreary@sword.eng.hou.compaq.com (Ed McCreary) Subject: C++ problem with BC++ 3.1 Message-ID: <1992Dec8.203056.29165@twisto.eng.hou.compaq.com> Sender: news@twisto.eng.hou.compaq.com (Netnews Account) Organization: Compaq Computer Corp. Date: Tue, 8 Dec 1992 20:30:56 GMT Lines: 36