0

Pointers and functions on c++

Hey, i know, that its possible to use pointers on functions witouth using "return", so...how it look like????

24th Apr 2019, 7:44 AM
Սեդ
Սեդ - avatar
1 Respuesta
+ 4
void f(int *x) { ++*x } If you call it with the adress of a variable (like f(&var)), it gets changed directly from the function, so there's no need to return anything.
24th Apr 2019, 9:14 AM
HonFu
HonFu - avatar