function names do function arguments

Source: Internet
Author: User

void (*FUNC) (int) know what it means to define this function?

First explain void (*FUNC) (int):
void func ()->void func (int)->void *func (int)->void (*func) (int)
Can you see the diagram above? Func is a function pointer whose return type is void, and the function it points to receives an int type parameter. If it is written as void *func (int) It becomes: Func is a function whose return type is a pointer of type void and accepts an int parameter.

So void (*signal (int sinno,void (*FUNC) (int)))) (int) means:
Signal is a function pointer whose return type is void, which receives an argument of type int, but this pointer is the return value of another function, which receives 2 parameters, the first is int, the second one has been explained.

function names do function arguments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.