Re: where is _ATL_SIMPLEMAPENTRY defined?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks Norbert,


1.

What do you mean "That way you have one and only functiob", especially
"functiob" in your sample?

2.

As far as I can see, you still use pointer of function type, other than
function type. So, I doubt whether there are any practical usage for function
type alone. I re-write the code you showed before using function pointer
other than using function type, any drawbacks in my code compared with yours?

[Code]
// define function type
typedef void (*testfunc)(int arg1, int arg2);

void test1(int arg1, int arg2)
{
}

void demo()
{
// pointer to a testfunc

testfunc p = test1;

// call function
p(10, 20);
}
[/Code]


regards,
George
.



Relevant Pages

  • Re: dereferencing function pointer types
    ... typedef int; ... Dereferencing a function pointer does nothing. ... & (function type expression) ...
    (comp.lang.c)
  • Re: pointers to functions question
    ... void func; ... func(int arg){ ... A function call actually requires a function pointer value before the ... any expression of function type) is ...
    (comp.lang.c)
  • Re: function pointers as function parameters
    ... That's the size of a pointer. ... The * operator always converts the function type expression ... The second one has no conversions. ...
    (comp.lang.c)
  • Re: some pointer issues....
    ... The only two times when an expression of function type is not ... automatically converted to a pointer, ... Since sizeof is not defined for expressions of function type, ... pete would you like to explain by giving an example? ...
    (comp.lang.c)
  • Re: function pointers as function parameters
    ... > The * operator always converts the function type expression ... > to a pointer, ... the * operator doesn't do any conversions. ... The * operator expects a pointer operand; ...
    (comp.lang.c)