Complex C declaration

后端 未结 8 1476
清歌不尽
清歌不尽 2020-11-30 18:47

I was just going through some code on the Internet and found this:

float * (*(*foo())[SIZE][SIZE])()

How do I read this declaration? Is the

8条回答
  •  长情又很酷
    2020-11-30 19:20

    The best thing to do here is convert to a series of typedefs.

    typedef float * fnReturningPointerToFloat();
    typedef fnReturningPointerToFloat* fnArray[SIZE][SIZE];
    fnArray* foo();
    

提交回复
热议问题