当前位置:网站首页>C language complex type description
C language complex type description
2022-06-13 01:56:00 【richardgann】
We often encounter some complicated pointer type descriptions , Many beginners may feel a little confused , In fact, according to a rule to analyze , It is not difficult at all
The laws of : Start with the variable name , According to the priority of combination , Step by step to analyze
explain :1、[] Is greater than *
2、() The priority of is greater than that of the pointer
principle :1、 The pointer and A combination , The content pointed to is A
2、 An array with the A combination , Then the data type of each element in the array is A
3、 The standard form of the function is : Function return value type Function name ( parameter list )
int p // This is a normal integer variable
int *p // This is a pointer , The content pointed to by the pointer is integer data
int p[3] // This is a normal array , Yes 3 Elements , The data of each element is an integer
int *p[3] //p Precede [] combination , This is an array , There are 3 Elements , And again * combination , Indicates that the type of each element is a pointer , And again int combination , Indicates that each pointer points to int type
int (*p)[3] // p The first and * combination , Description is a pointer , Then with [] combination , What the pointer points to is an array , The array has 3 Elements , And again int combination , Explain that each element is int type
int **p // Is an ordinary two-level pointer
int p(int ) // An ordinary function p, The return value is int type , The parameter of the function is int type
int (*p)(int) //*p It's a pointer , And again () combination , The pointer points to a function , Look again () Medium int , Description: the function parameter is int type , Combine the leftmost int, The return value of the function is also int type
int *(*p(int))[3] // p The first and () combination , explain p It's a function , The function parameter is int type , And again * combination , The return value of this function is a pointer , Follow again [] combination , The pointer refers to an array , The array has 3 Yuan // plain , And again * combination , The type of each element is a pointer , Then each pointer points to int type .
边栏推荐
- LabVIEW large project development tools to improve quality
- Use mediapipe+opencv to make a simple virtual keyboard
- What is the path field—— Competitive advertising
- A DPU architecture without CPU: Hyperion
- dfs与bfs解决宝岛探险
- 什么是立体角
- 4、 Improvement of warehousing management function
- 三、上传织物图片至SQL Server并提供name进行展示织物照片
- Devaxpress Chinese description --tcximagelist (enhanced image list control)
- [pytorch FAQ] numpy:dll load failed while importing_ multiarray_ Umath: the specified module could not be found.
猜你喜欢

What is solid angle

谷歌的受众群体是如何发挥作用的?

LabVIEW大型项目开发提高质量的工具

Top level configuration + cooling black technology + cool appearance, the Red Devils 6S Pro is worthy of the flagship game of the year

Stm32 3*3 matrix key (register version)

华为设备配置双反射器优化虚拟专用网骨干层

Use of Arduino series pressure sensors and detected data displayed by OLED (detailed tutorial)

一种不带CPU的DPU架构:Hyperion

4、 Improvement of warehousing management function

MySQL download and installation
随机推荐
分享三个关于CMDB的小故事
In addition to the full screen without holes under the screen, the Red Devils 7 series also has these black technologies
C语言压缩字符串保存到二进制文件,从二进制文件读取压缩字符串后解压。
Workspace for ROS
Vscode configuration header file -- Take opencv and its own header file as an example
What is Google plus large text ads? How to use it?
Logging system in chromium
Ctrip reshapes new Ctrip
LabVIEW large project development tools to improve quality
Should the audience choose observation mode or positioning mode?
Combining strings and numbers using ssstream
[arithmetic, relation, logic, bit, compound assignment, self increasing, self decreasing and other] operators (learning note 4 -- C language operators)
pytorch : srcIndex < srcSelectDimSize
Delphi7 compressed pictures (BMP, JPG, PNG)
What did Hello travel do right for 500million users in five years?
Compiling minicom-2.7.1 under msys2
3、 Upload fabric photos to SQL server and provide name to display fabric photos
华为设备配置CE双归属
Detailed explanation of deep learning parameter adjustment skills
谷歌的智能出价有几种?