#include #include using namespace std; void f(int copy, int *p, const int& r); int main() { int i1 = 10; int i2 = 20; int i3 = 30; f(i1, &i2, i3); cout << "i1 == " << i1 << "\n" << "i2 == " << i2 << "\n" << "i3 == " << i3 << "\n"; return EXIT_SUCCESS; } void f(int copy, int *p, const int& r) { cout << "Arguments are " << copy << ", " << *p << ", " << r << ".\n"; ++copy; //has no effect on i1 ++*p; //add 1 to i2; means *p = *p + 1 //++r; //won't compile: r is a read-only reference }