当前位置:网站首页>C语言_结构体指针变量引入
C语言_结构体指针变量引入
2022-07-26 13:51:00 【Linux 攻城狮】
结构体指针变量引入
01——概念引入
回忆:
指针就是地址!
指针变量就是存放地址的变量!
结构体也是变量!
变量访问有两种方式:1.变量名直接访问2.地址间接访问!
之前案例,是用变量名直接访问的。
通过结构体变量地址来访问该结构体需要一个变量来保存这个地址:这和之前说的指针,其实是一样的。只是指针的类型是结构体。

02——通过结构体指针来访问结构体内容


注意:
变量名访问:用点运算符
地址访问:用“->”运算符

边栏推荐
- ROS2学习(1)ROS2简述
- 421. Maximum XOR value of two numbers in the array
- JS, e.pagex, pagey modal box drag
- The last time I heard about eBay, or the last time
- 2022-07-26 Daily: the first anniversary of the establishment of alphafold DB database, research on the lighting point of official promotion
- 大脑带来的启发:深度神经网络优化中突触整合原理介绍
- Synchronization mechanism of go (sync.mutex)
- 力扣------字符串中的单词数
- Add a display horizontal line between idea methods
- Pytorch学习笔记(一)安装与常用函数的使用
猜你喜欢
![[oauth2] VIII. Configuration logic of oauth2 login -oauth2loginconfigurer and oauth2clientconfigurer](/img/7e/4f652c4d3d72ad563ddbc1c1f1f50b.png)
[oauth2] VIII. Configuration logic of oauth2 login -oauth2loginconfigurer and oauth2clientconfigurer

天翼云Web应用防火墙(边缘云版)支持检测和拦截Apache Spark shell命令注入漏洞

php使用sqlserver

Ros2 learning (1) introduction to ros2

Videojs to canvas pause, play, switch video

Abstract factory and its improvement examples

【着色器实现Overlay重新覆盖变装效果_Shader效果第九篇】

Oom caused by improper use of multithreading

MySQL's practice of SQL analysis and optimization from the index principle

Use the requests library to crawl web pages
随机推荐
Unicorn, valued at $1.5 billion, was suddenly laid off, and another track was cold?
Docker container MySQL enables binlog and scheduled backup
JS, e.pagex, pagey modal box drag
How to quickly design a set of cross end components that support rendering rich text content
力扣------字符串中的单词数
In 2022, we "sent away" so many Internet products in only one month
Pytoch learning notes (II) the use of neural networks
2022-07-26 Daily: the first anniversary of the establishment of alphafold DB database, research on the lighting point of official promotion
Convert the array in JSON file to struct
Latest battle report: Ten certifications and five best practices
Time complexity and space complexity
Abstract factory and its improvement examples
Time complexity analysis of bubble sorting
The difference between V-model and.Sync modifier
循环队列(c语言实现)
Go multithread communication, control coordination and main thread shutdown (sync.waitgroup)
Mobile dual finger scaling event (native), e.originalevent.touches
The serialization class in unity is in JSON format
Familiarize you with the "phone book" of cloud network: DNS
Seven steps to copywriting script ---- document team collaborative management