bug-gplusplus
[Top][All Lists]
Advanced

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

Re: Strange Error Message


From: Sebastian Hentschel
Subject: Re: Strange Error Message
Date: Tue, 23 Jul 2002 15:41:17 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc2) Gecko/20020513 Netscape/7.0b1

Thomas Maeder wrote:
address@hidden (Sebastian Hentschel) writes:


We use g++ 3.1

I must put a functionpointer type
const char* (pointer) (void **,int*,void*) and we got a static


This is not a function pointer type. Try

typedef const char* (*fptr_t) (void **,int*,void*);
fptr_t pointer = &Message::MessageCallBack;

OK, now it runs.
But the strage thing is.

Thas it works in the following way (5 or 6 times in my code)

void (pointer) (void **,int*,void*);

and in the next line

pointer = CallBackFunction;

Without the & before the function and without the typedef.

And the error message is realy confusing for me.

Thanks

Sebastian




function in our class.

static const char* Message::MessageCallBack(void** buf,int* len,void* args);

and when we type

pointer = MessageCallBack


The correct syntax is

pointer = &Message::MessageCallBack;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]