Many C/C ++ beginners are often confused by complicated statements. For example:Char * (* A []) (),What does this statement mean?
You don't have to worry about it. In a Linux environment, there is a tool that can help us resolve it. It is cdecl. It can be converted between C/C ++ and English. Let's take a look at the description in man cdecl:
Description
Cdecl (and C ++ Decl) is a program for encoding and decoding C (or C ++) type declarations. the C language is based on the (draft proposed) x3j11 ANSI standard; optionally, the C language may be based on the pre-ANSI definition defined by kernighan & Ritchie's the C programming language book, or the C language defined by the Ritchie PDP-11 C compiler. the C ++ language is based on Bjarne stroustrup's the C ++ pro-gramming language, plus the version 2.0 additions to the language.
It is easy to use: Enter the cdecl command to enter the interactive interface:
# Cdecl
Type 'help' or '? 'For help
Cdecl>
Enter the following command:
Explain char * (* A []) ()
Let's see what the output is:
Declare a as array of pointer to function returning pointer to Char
Cdecl>
In turn, let's take a look at the output English as a command and execute it again:
Cdecl> declare a as array of pointer to function returning pointer to Char
Char * (* A []) ()
Cdecl>
Easy to use. If you do not understand it, please help.
In Hangzhou