Advertisement
bogolyubskiyalexey

Untitled

Jan 22nd, 2021
810
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.24 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. void f(int);
  5. void f(double);
  6. void f(int, std::vector<char>&);
  7.  
  8. void f(int value) {
  9.     std::cout << "int=" << value << std::endl;
  10. }
  11.  
  12. void g() {
  13.     f(3);
  14.     f(4.5);
  15. }
  16.  
  17. void f(double value) {
  18.     std::cout << "double=" << value << std::endl;
  19. }
  20.  
  21. void f(int value, std::vector<char>& symbols) {
  22. }
  23.  
  24. int z = 123;
  25.  
  26. namespace alexbogo {
  27.     int z = 567;
  28.     int f() {
  29.         return 123;
  30.     }
  31.     void qwerty() {
  32.  
  33.     }
  34.  
  35. };
  36. namespace badns {
  37.     int z = 76655;
  38.     int f() {
  39.         return 23424234;
  40.     }
  41.     void qwerty() {
  42.  
  43.     }
  44.    
  45. };
  46.  
  47. void qwerty() {
  48.  
  49. }
  50.  
  51.  
  52. int main() {
  53.     alexbogo::qwerty();
  54.     badns::qwerty();
  55.     qwerty();
  56.     int z = 4;
  57.  
  58.     /*for (int i = 0; i < 10; ++i) {
  59.         std::cout << z << std::endl;
  60.         int z = 5;
  61.         std::cout << z << std::endl;
  62.     }*/
  63.  
  64.     {
  65.         int z = 10;
  66.         std::cout << z << std::endl;
  67.         {
  68.             int z = 11;
  69.             std::cout << z << std::endl;
  70.             std::cout << ::z << std::endl;
  71.             {
  72.                 std::cout << z << std::endl;
  73.                 {
  74.                     std::cout << z << std::endl;
  75.                 }
  76.             }
  77.         }
  78.     }
  79.    
  80.  
  81. }
  82.  
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement