C++ begineer : using namespace error
<p>I am really new in C++, and I can not solve the compilation error below.</p>

<p>data_structure.h</p>

<pre><code>#include &lt;stdint.h&gt;
#include &lt;list&gt;

namespace A {

        class B {
            public:

            bool        func_init(); // init
            };

};
</code></pre>

<p>data_structure.cpp</p>

<pre><code>#include "data_structure.h"

using namespace A;

bool B::func_init(){

    std::cout &lt;&lt; "test init" &lt;&lt; std::endl;
    return true;

}
</code></pre>

<p>main.cpp</p>

<pre><code>#include    &lt;iostream&gt;
#include    "data_structure.h"

using namespace A;

int main( int argc, char **argv ) {

    A::B s;
    s.func_init();

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

<p>I have an error as the following</p>

<blockquote>
  <p>undefined reference to `A::B::func_init()'</p>
</blockquote>

<p>Please kindly advice why I can not get the func_init, eventhough it is declared as public? I have put also the correct namespace there.</p>

<p>Would appreciate for any response.</p>
