Follow Us
  • Register
Errorbase is a collaborative writing project, that aims to build the largest trouble-shooting guide about all kinds of error messages.


+2 votes
Can anybody explain  how the value of one member function variables can be called in other member  function in same class...
requested by
edited by

1 Solution

0 votes

If you are asking how to reach one variable in one function from the other one, then it is not possible. The scope of the variable is only inside of the block where it is defined. Outside of the block you can't get the value or reach the variable.


The only way is to call the other function and pass the argument by value. This topic has been covered detailly below:


This is the ultimate resource for c++.


You can also provide the code to get more help about the subject.

solved by (560 points)