Article View: gnu.g++.bug
Article #646a libg++ bug?
From: sharif_el_kassas
Date: Thu, 30 Nov 1989 17:00
Date: Thu, 30 Nov 1989 17:00
20 lines
1129 bytes
1129 bytes
Hi
I'm using libg++ ver 1.35.0 (May 8, 88), with g++ version 1.35.0
I found that the following example gives problems (a'core dumped')
-----
#include <CursesWindow.h>
//CursesWindow test(stdscr); // this is OK statics are 0 by default !
main(){
CursesWindow test(stdscr); // this gives a 'core dumped' !
test.addstr("stdscr test: ");
test.refresh();
}
// compile with: g++ filename.cc -lg++ -lcurses -ltermcap
-----
I think this happens because CursesWindow::CursesWindow(WINDOW* &)
dos not initialize 'par' and 'sib' which confuses CursesWindow::~CursesWindow().
Replacing 'subwins = 0' by 'subwins = par = sib = 0' in
'CursesWindow(WINDOW* &)' seems to solve the problem!
What do u think?
Bye
Sherif Kassas
Technical Details
Message-ID:
<8911301500.AA22337@eb.ele.tue.nl>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!eb.ele.tue.nl!elkassasShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!eb.ele.tue.nl!elkassas From: elkassas@eb.ele.tue.nl (sharif_el_kassas) Newsgroups: gnu.g++.bug Subject: a libg++ bug? Message-ID: <8911301500.AA22337@eb.ele.tue.nl> Date: 30 Nov 89 17:00:22 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 20