0

How to run call by value

area of circle

16th Jan 2017, 8:32 AM
John Bryanlara
John Bryanlara - avatar
2 Réponses
+ 1
int aoc(int) is by value int aoc(int*) is by reference
16th Jan 2017, 8:49 AM
Mattias Eriksson
Mattias Eriksson - avatar
+ 1
@Mattias int aoc(int* val); you are passing pointer as argument. int aoc(int &val); there you are passing reference as argument.
16th Jan 2017, 10:01 AM
Jakub Stasiak
Jakub Stasiak - avatar