c++ function in namespace won't work?
<p>This is weird and I'm trying to find the reason why would the first call to <code>Draw</code> on the object <code>shape</code> is fine while the second call to Draw on the "text" field will work only when supplying the prefix of the namespace? (ie <code>Shapes::Draw</code>) :</p>

<pre><code>#include &lt;iostream&gt;
namespace Shapes
{
    class Shape {
        public:
            Shape() {}
            virtual void InnerDraw() const {
                std::cout &lt;&lt; "Shape\n";
            }
    };

    class Square : public Shape {
        public:
            void InnerDraw() { std::cout &lt;&lt; "Square\n"; }
    };

    void Draw(char* text) { std::cout &lt;&lt; text; }

    void Draw(const Shape&amp; shape) {
        Draw("Inner: ");
        shape.InnerDraw();
    }

    Shape operator+(const Shape&amp; shape1,const Shape&amp; shape2){
        return Shape();
    }
}


int main() {
    const Shapes::Square square;
    Shapes::Shape shape(square);

    Draw(shape); // No need for Shapes::
    Draw("test"); // Not working. Needs Shapes:: prefix

    return 0;
}
</code></pre>
