Skip to content
Snippets Groups Projects
Select Git revision
  • b35a917b67a34b74af64d9107ebbff4fc4abd259
  • master default protected
  • v_230512
3 results

namespaces2.cc

Blame
  • namespaces2.cc 455 B
    #include <iostream>
    namespace UnitedKingdom {
    std::string London = "Big city";
    }
    namespace UnitedStates {
    namespace KY {
        std::string London = "Small town in Kentucky";
    }
    namespace OH {
        std::string London = "Small town in Ohio";
    }
    }
    // The following definition is ok since C++17
    //namespace mylibrary::onefeature {
    //    double solve(int i);
    //}
    auto main() -> int
    {
        namespace USOH = UnitedStates::OH;
        std::cout << USOH::London << "\n";
    }