当前位置:网站首页>Static keyword and its application
Static keyword and its application
2022-04-23 22:04:00 【Scarcity risk humility】
1、 Used in this procedure page , Variables with the same name on different pages will not conflict ;
2、 Variable life cycle accompanies the whole program life cycle ;
1、 Static data members are also called class variables , Common data members are also called instance variables ; Static data members are each class All have one , The common data member is each instance There is one ;
2、 Static member functions : Used to modify class Member function of
1. Static members can access each other , Including static member functions, accessing static data members and accessing static member functions .
2. Non static member functions can arbitrarily access static member functions and static data members .
3. Static member functions cannot access non static member functions and non static data members .
4. Call static member function , You can use member access operators (.) and (->) Calling static member functions for an object of a class or a pointer to an object of a class , You can also use the class name :: Function name call ( Because he belongs to class , It's normal to call with a class name )
版权声明
本文为[Scarcity risk humility]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/113/202204232201249957.html
边栏推荐
- How to use the project that created SVN for the first time
- LabVIEW修改应用程序窗口外观
- JS merge duplicate data in array object
- A method of asynchronous response of application service through load balancing
- 服务间通信和RestTemplate完成服务间通信
- LabVIEW显示控件中内容过长设置自动滚动条
- 世界读书日,腾讯安全推荐一份充电书单
- Download, install and configure Huawei integrated development environment ide deveco device tool
- 微服务系统中服务降级
- [leetcode refers to the maximum profit of offer 63. Stock (medium)]
猜你喜欢
MySQL back to table
Cancel the default open project setting of idea
阿里又一个“逆天”容器框架!这本Kubernetes进阶手册简直太全了
Display, move, rotate
Spellman high voltage power supply maintenance xrm50p50x3768 power supply maintenance pcm70n120x451
JUnit unit test ---- a good tool for testing a single method
Implementation of service fusing
[※ leetcode refers to offer 46. Translate numbers into strings (medium)]
Database Experiment 3 data update experiment
DW basic course (II)
随机推荐
QT QML component library records owned by QML except basic components
服务雪崩、服务熔断、服务降级
Ribbon负载均衡策略
降级和熔断总结
Cvpr2022 | efficient pre training based on knowledge distillation
Pytorch installation link sharing
OpenFeign之响应处理
Vscode may not establish connection to "XXX"
leetcode 2223 — 构造字符串的总得分和
Resolve the "chromedriver executable needs to be in path" error
上海确保疫情保供生活物资质量和食品安全
21. Basic usage of MariaDB
CVPR2022 | 基于知识蒸馏的高效预训练
微服务系统中服务降级
SSH in win10
从严从重从快 上海全面加强疫情期间食品安全监管
将OSS上的图片转换成Base64编码
openFeign 服务调用
C# ftpHelper
Unity制作一个小星球