Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int x = 2;
- int y = 3;
- int main()
- {
- int x = 4;
- int y = 5;
- cout << "Lokalni:" << endl;
- cout << "x = " << x << endl;
- cout << "y = " << y << endl << endl;
- cout << "Globalni:" << endl;
- cout << "x = " << ::x << endl;
- cout << "y = " << ::y << endl << endl;
- x = x - ::y;
- ::y = ::y + x;
- cout << "Novi lokalni:" << endl;
- cout << "x = " << x << endl;
- cout << "y = " << y << endl << endl;
- cout << "Novi globalni:" << endl;
- cout << "x = " << ::x << endl;
- cout << "y = " << ::y << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement