Path: 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 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 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