Answer the question
In order to leave comments, you need to log in
How to find a variable that is specified in a function as a parameter?
int var1 = 1;
int var2 = 2;
void someFunction( int used_variable) {
used_variable +=1;
//??? код который вернёт подставленной переменной значение
}
// чтобы на выходе было так:
someFunction(var1);
// var1 стала равна 2
someFunction(var2);
// var2 стала равна 3
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question