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????
1 Resposta
+ 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.