mousehandler
Tobias Pankrath
tobias at pankrath.net
Sat Oct 27 07:13:41 PDT 2012
On Saturday, 27 October 2012 at 14:05:20 UTC, hr wrote:
> On Saturday, 27 October 2012 at 11:59:16 UTC, Tobias Pankrath
> wrote:
>> try:
>>
>> Handler[] mouse_handlers = new [WM_MOUSELAST - WM_MOUSEFIRST
>> + 1]
>>
>> or if the size is statically known:
>> Handler[WM_MOUSELAST - WM_MOUSEFIRST + 1] handler;
>
> Thank you for your help.
>
> after doing what you propose, i get the error message:
> Error 1 Error: function Handler is used as a type
>
>
> void Handler(int, int); is function prototype.
> any other suggestions?
This works for me:
void handler(int a, int b) {} ;
void main()
{
alias void function(int, int) Handler;
Handler[] handlers = new Handler[12];
handlers[0] = &handler;
}
More information about the Digitalmars-d-learn
mailing list