Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void test(int a)
- {
- a++;
- };
- void test2(int &a)
- {
- a++;
- };
- int main()
- {
- int a = 0;
- test(a);
- cout << a; // выведет 0
- test2(a);
- cout << a; // выведет 1
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement