function as a parameter

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • maths_fan

    function as a parameter

    Is it correct to write:

    void g(void f(int i));

    (I know that most of the time it's written: void g(void (*f)(int i)),
    but the compiler doesn't mind the first one, too. Is it correct by the
    standart?)
  • Dave

    #2
    Re: function as a parameter


    "maths_fan" <maths_fan@mail .ru> wrote in message
    news:c13b5d9.04 02270802.4b1fa3 c0@posting.goog le.com...[color=blue]
    > Is it correct to write:
    >
    > void g(void f(int i));
    >
    > (I know that most of the time it's written: void g(void (*f)(int i)),
    > but the compiler doesn't mind the first one, too. Is it correct by the
    > standart?)[/color]

    Yes.


    Comment

    Working...