首页 | 本学科首页   官方微博 | 高级检索  
     检索      

C++语言中静态数据成员的研究
引用本文:张永,方安仁,刘治生.C++语言中静态数据成员的研究[J].陕西理工学院学报(自然科学版),2005,21(4):22-24.
作者姓名:张永  方安仁  刘治生
作者单位:1. 南昌航空工业学院,计算机系,江西,南昌,330063
2. 江西科技职业学院,江西,南昌,330200
3. 江西城市职业学院,江西,南昌,330004
摘    要:深入分析了C 语言中类静态数据成员的声明和访问方法,指出了程序设计中利用全局变量来实现数据共享的弊端,同时给出了利用类静态数据成员取代全局变量的方法以及在程序设计中使用类静态数据成员时应注意的问题,详细阐述了类静态数据成员在程序设计中的作用,并举了相应的实例来说明如何正确使用静态数据成员。

关 键 词:  C  语言  静态数据成员  全局变量
文章编号:1673-2944(2005)04-0022-03
收稿时间:2005-08-29
修稿时间:2005年8月29日

Research of static data member in C++ Language
ZHANG Yong,FANG An-ren,LIU Zhi-sheng.Research of static data member in C++ Language[J].Journal of Shananxi University of Technology:Natural Science Edition,2005,21(4):22-24.
Authors:ZHANG Yong  FANG An-ren  LIU Zhi-sheng
Abstract:On the basis of a thorough analysis of the methods of declaration and accessing to the static data member in C language,authors point out the abuse of utilizing global variable to implement the shared data in program design,and at the same time give out the ways how a static data member replaces the global variable and questions to be paid attention to in using static data member.In addition,the effect of static data member in programming is described in detail,and finally this paper gives the examples to show how to use correctly static data members.
Keywords:class  C    static data member  global variable
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号