Re: gtkentry->set_text("hello") segmentation fault signal 11
- From: Jonathon Jongsma <jonathon quotidian org>
- To: Oscar Dávila <odavilar gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: gtkentry->set_text("hello") segmentation fault signal 11
- Date: Thu, 21 May 2009 12:16:33 -0500
Oscar Dávila wrote:
This is how i have declared the entry
Gtk::Entry* entry_rapidrate;
entry_rapidrate->set_text("hello");
You didn't create any widget, you simply declared a pointer to a widget and didn't even
initialize it to a value. This is pretty basic C/C++, so I would suggest doing a bit of
studying of basics first. In any case, you would need to do something like:
Gtk::Entry *entry_rapidrate = new Gtk::Entry();
entry_rapidrate->set_text("hello");
// later when you're done using the entry, free it so you
// don't leak memory
delete entry_rapidrate;
--
jonner
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]