本文介绍了如何为此编写getter函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在这个帮助器类中有一些数据:
Hi,
I''ve a some data in this helper class called:
protected:
CChartPointsArray<T> m_vPoints;
我需要从另一个类访问此数据.如何编写"getter"函数以获取数据?我不应该从受保护"更改为公开".
还是有其他方法可以在不从受保护"更改为公开"的情况下获取数据?
< T>是一个结构
I need to access this data from another class. How do i write the "getter" function to get the data? I am not supposed to changed from "protected" to "public".
Or is there any other way to get the data without changing from "protected" to "public"?
<T>is a struct
推荐答案
这篇关于如何为此编写getter函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!