Thread View: gnu.g++.bug
1 messages
1 total messages
Started by sharif_el_kassas
Thu, 30 Nov 1989 17:00
a libg++ bug?
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads