Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I've a some data in this helper class called:
C++
protected:
CChartPointsArray<T> m_vPoints;


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
Posted
Updated 4-Apr-12 17:00pm
v3

1 solution

Try making a friend class or function to access the data goto this[^] link.

http://msdn.microsoft.com/en-us/library/h2x4fzdz.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900