Question: without getting too into it, i need to access a private variable to use that number in a calculation. i have a function to return

without getting too into it, i need to access a private variable to use that number in a calculation. i have a function to return it, my question becomes if I call

1
2
3
4
5
int PVreturn() {
return privateVariableName };


is this something that I can drop into a math equation?

example:


1
2
3
4
5
6
int PvMaths() {
int newvariable newvariable = PVreturn() + 6 };


if not what's the best way I could do that?


Step by Step Solution

3.42 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

int PVreturn ret... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!