![]() |
How to get store a value returned by a const member function?
Hi ,
I have a const member function which returns a protected member of a class.Like this Code:
class AI want to use the value returned by the Get_Number function. How can i do int temp=Data.Get_Number(); is giving me an execption(Data is of type "A&") Can anyone help me??... |
Re: How to get store a value returned by a const member function?
Data is object of class A . Declare it
const A Data; |
Re: How to get store a value returned by a const member function?
Code: cpp
This code has no problems. What's your problem??? Let me know exactly what u wanna? |
| All times are GMT +5.5. The time now is 11:02. |