Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- using namespace std;
- void Func(int x, int &y,int *z)
- {
- x += 1;
- y += 1;
- *z += 1;
- cout << "func: \t" << x << "\t" << y << "\t" << *z << endl;
- }
- int main()
- {
- int a = 1, b = 2, c = 3;
- cout << "main: \t" << a << "\t" << b << "\t" << c << endl;
- Func(a, b, &c);
- cout << "main: \t" << a << "\t" << b << "\t" << c << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement