Re: gtkentry->set_text("hello") segmentation fault signal 11



On 05/22/2009 06:59 PM, Oscar Dávila wrote:

i was doing this "refXml->get_widget("entry_casaherr_z", entry_casaherr_z);"
in a function that was called when a button was pressed, to solve the
problem i just put "refXml->get_widget("entry_casaherr_z",
entry_casaherr_z);" in the int main() and then my

Gtk::Entry* entry_rapidrate;
entry_rapidrate->set_text("hello");

works..

By a pure random coincidence because the compiler just happen to reuse the same register for the new variable since he knows the other is no longer used.

The compiler should even have warned you it was being used not initialized.

Maybe it is time to learn C++, like murray suggested.


Hub


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]