Skip to content

Instantly share code, notes, and snippets.

@hydai
Created February 28, 2016 09:49
Show Gist options
  • Save hydai/20efa2f2074abce78b33 to your computer and use it in GitHub Desktop.
Save hydai/20efa2f2074abce78b33 to your computer and use it in GitHub Desktop.

Revisions

  1. hydai created this gist Feb 28, 2016.
    13 changes: 13 additions & 0 deletions namespace-example.cpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #include <iostream>

    namespace A {
    int x = 1;
    }

    namespace B {
    int x = 2;
    }
    int main() {
    std::cout << A::x << " " << B::x << std::endl;
    return 0;
    }