摘要
私有访问是C++中三种访问权限的一种,是访问权限中最严格的。类对象的私有成员分私有函数和私有数据两部分,其中私有数据有特殊的作用;但是私有函数有很大的弊端,应该尽力消除。论文讨论了几种消除私有函数的方法,并重点论述了匿名命名空间的方法,同时提出了函数的私有函数的概念。
Private access is one of three access rights in C++,which is the hardest one in all.Private member is composed of private function and private data.Private data has its special usage,but private function has severe advantage and should be removed at full stream.This article discusses many methods and puts emphasis on the method of anonymous namespace.Meantime it discusses the concept of function's private functions.
出处
《计算机工程与应用》
CSCD
北大核心
2005年第7期90-92,103,共4页
Computer Engineering and Applications
基金
国家863高技术研究发展计划项目(编号:2002AA114020
2001AA135210)
中国科学院知识创新项目(编号:20036020)资助