I haven't counted the lines, but the offending line is without doubt:
calendar->selected().connect(root(), &addWidget::daySelected);

The connect() function specifies which method has to be called when
the user selects an item in the calendar. The first parameter is a
class instance, the second parameter is supposed to be a member
function pointer.

There are two problems with this line as you write it:
(1) root(), a WContainerWidget, probably does not contain any
functions that you want to execute as a result of selecting an item in
the calendar
(2) addWidget::daySelected is not a member function pointer. addWidget
is not even a class type. And given the first parameter, the second
parameter is most likely to start with WContainerWidget::...

This compilation error has nothing to do with the Wt library, but is
caused by wrong understanding of the C++ syntax. Read the chapter on
pointers to member functions of  your favorite C++ book.

BR,
Wim.

2011/6/28 PARVINDER RAJPUT <[email protected]>:
>
>
> On Tue, Jun 28, 2011 at 11:53 AM, H.S.Rai <[email protected]> wrote:
>>
>> On Tue, Jun 28, 2011 at 11:39 AM, PARVINDER RAJPUT <[email protected]>
>> wrote:
>> >
>> >> > ‘HelloApplication::HelloApplication(const Wt::WEnvironment&)’:
>> >> > /home/witty/Desktop/website/source/hello.C:65:40: error: ‘addWidget’
>> >> > has
>>
>> <snip>
>>
>> >> Where is declared addWidget.
>>
>> >Read error message:
>>
>> >hello.C:65:40: error: ‘addWidget’ has ...
>>
>> >Check possible wrong use, at line no. 65.
>>
> Sir this is example in WtClasses. I have as it is used.
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to