Re: Invoking a function through function pointer
- From: Chris Dollin <kers@xxxxxxxxxx>
- Date: Mon, 25 Apr 2005 10:03:43 +0100
Ravi kumar.N wrote:
> Respected Experts,
> Iam Ravikumar.N, I have a query regarding
> pointer to a function. I have a sample code, it is as follows
>
> void func(int x, int y)
> {
> cout << x << "\n";
> cout << y << "\n";
> }
C++, then.
> i.e. 1)(*fp)(10, 20);
> 2) fp(10, 20);
One has an unnecessary dereference operation written in it
(with brackets to enforce the correct grouping).
--
Chris "electric hedgehog" Dollin
.
- Follow-Ups:
- Re: Invoking a function through function pointer
- From: Angad
- Re: Invoking a function through function pointer
- References:
- Invoking a function through function pointer
- From: Ravi kumar.N
- Invoking a function through function pointer
- Prev by Date: Re: Throwing Exceptions
- Next by Date: Re: floyd-warshall
- Previous by thread: Invoking a function through function pointer
- Next by thread: Re: Invoking a function through function pointer
- Index(es):
Relevant Pages
|