当前位置:网站首页>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
边栏推荐
猜你喜欢
Error message: b04access.00f eve'. Read of address 000001B4
服务注册中心和Ribbon组件回顾
资本追逐Near生态
OpenFeign的参数传递之数组和集合类型
阿里又一个“逆天”容器框架!这本Kubernetes进阶手册简直太全了
OpenFeign的细节展示
[leetcode refers to offer 22. The penultimate node in the linked list (simple)]
RestTemplate 服务调用
Easylaser laser shaft alignment instrument maintenance homocentric instrument maintenance E420
Database experiment VI integrity language experiment
随机推荐
C # problem of updating data: dynamic SQL generation is not supported for multiple base tables
Pytorch deep learning practice (3)
资本追逐Near生态
Plato farm is one of the four largest online IEOS in metauniverse, and the transaction on the chain is quite high
Ribbon负载均衡策略
Oracle intercepts special characters
When pycharm debugs, view the tensor image of pytorch in the console
轻量化项目管理思路
UML学习转载
QT QML component library records owned by QML except basic components
[leetcode sword finger offer 28. Symmetric binary tree (simple)]
SSH in win10
JS prototype and prototype chain
Cvpr2022 | efficient pre training based on knowledge distillation
Ali has another "against the sky" container framework! This kubernetes advanced manual is too complete
C language programming based on loop structure (PTA)
A series of problems of C DataGridView binding list
在线Excel转CSV工具
Idea import a project
Database Experiment four View experiment