0

One of the questions for my study guide asks to write a function that prompts the user to enter 3 integers, then "return" the integers via it's parameters through call by reference. Does this just imply using pointers as arguments, then when the values are changed in the function they are also changed in main? What would the function prototype look like if it's not that way?

3
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by Savage221
0

Or in case you've by mistake posted this in C instead of C++ the prototype of interest would be

void foo(int& prm1, int& prm2, int& prm3);
0

Meant for it to be C, but thank you very much for looking out :) Thanks Ancient Dragon and thekayshyap, much appreciated!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.