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?
Savage221
0
Newbie Poster
Recommended Answers
Jump to Postyes, I think you have the right idea. The prototype might look something like this:
void foo(int* prm1, int* prm2, int* prm3);
All 3 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
thekashyap
193
Practically a Posting Shark
Savage221
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.