C++语言中静态数据成员和静态成员函数的研究  被引量:1

Research of Static Data Member and Static Member Function in C++ Language

在线阅读下载全文

作  者:廖锋[1] 胡丽平[2] 杨巧合[2] 

机构地区:[1]江西制造职业技术学院实验中心,江西南昌330001 [2]南昌航空工业学院,江西南昌330063

出  处:《电脑知识与技术》2006年第7期162-163,共2页Computer Knowledge and Technology

摘  要:本文深入分析了C++语言中类静态数据成员和静态成员函数的作用以及声明和访问方法,指出了程序设计中利用全局变量来实现数据共享的弊端,同时给出了解决方案,也指出了静态成员函数访问非静态成员的解决方法,并举了相应的实例来说明如何正确使用静态数据成员和静态成员函数。On the basis of deep analyzing the effect of static data member and static member fimction in C++ language,and discussing the methods of declaration and accessing,and pointing out the abuse of utilizing global variable to implement shared data in program design,and at the same time giving out the resolvent,in addition,indicating the resolvent in which static member function can access non-static member function, and finally the author gives the examples to show how to use correctly static data members and static member function.

关 键 词: C++ 静态数据成员 静态成员函数 全局变量 

分 类 号:TP312[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象