Question
Each of the following functions has errors. Locate as many errors as you can.void getValue(int value&){cout << "Enter a value: ";cin >> value&;}
Step 1
The function is declared as `void getValue(int value&)`, but the correct syntax for passing a reference in C++ is `void getValue(int &value)`. The ampersand should be placed next to the variable name, not the type. Show more…
Show all steps
Your feedback will help us improve your experience
Watch the video solution with this free unlock.
EMAIL
PASSWORD