本文介绍了是否可以访问类的私有成员?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以访问c ++中类的私有成员。

Is it possible to access private members of a class in c++.


推荐答案

意味着使用一些指针算术来获得访问?这是可能的,但肯定是危险的。还要查看此问题:

You mean using some pointer arithmetic to gain the access ? It is possible but is definitely dangerous. Take a look at this question also: Accessing private members

这篇关于是否可以访问类的私有成员?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-27 08:04
查看更多