Re: unresolved overloaded function signal
- From: klaus triendl <klaus triendl eu>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: unresolved overloaded function signal
- Date: Tue, 16 Sep 2008 22:46:53 +0200
Paulo Flabiano Smorigo schrieb:
Hi everyone,
I have a signal in my code like this:
button.signal_clicked().connect(sigc::bind<int>( sigc::mem_fun(*this,
&Red::setNumber), 1));
And two overloaded functions:
void Red::setNumber(int value);
void Red::setNumber(char* value);
When compile gives me an "unresolved overloaded function signal" error.
How can I fix this?
By specifying the member function's argument type to mem_fun<>:
button.signal_clicked().connect(sigc::bind(sigc::mem_fun<int>(*this,
&Red::setNumber), 1));
Klaus Triendl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]