Advertisement
Guest User

Untitled

a guest
May 26th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include    <iostream>
  2. using namespace std;
  3.  
  4. namespace first
  5. {
  6.     int x = 10, y = 25;
  7. }
  8.  
  9. namespace second
  10. {
  11.     double x = 10.25, y = 25.52;
  12. }
  13.  
  14. int main ( void )
  15. {
  16.    
  17.     using namespace first;
  18.  
  19.     cout << x << endl;
  20.     cout << y << endl << endl;
  21.  
  22.     cout << second::x << endl;
  23.     cout << second::y << endl << endl;
  24.  
  25.     system("pause");
  26.     return 1;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement