Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int* foo() {
- int a = 20;
- return &a;
- }
- int& bar() {
- int a = 20;
- return a;
- }
- int main()
- {
- int* a1 = foo();
- int& a2 = bar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement