whats wrong with my c++ list<string>
<p>bee.cpp</p>

<pre><code>            list&lt;string&gt; urls;

              urls.push_back ("one");
              urls.push_back ("two");
              urls.push_back ("Three");
              urls.sort();

                  TP(urls);
</code></pre>

<p>TP.h</p>

<pre><code>namespace std {

        class TP {
        public:
            TP(list&lt;string&gt; u);
            virtual ~ThreadPool();
        };

    }
</code></pre>

<p>TP.c++</p>

<pre><code>    TP::TP(list&lt;string&gt; u) {
        list&lt;string&gt;::iterator it;
        for (it=mylist.begin(); it!=mylist.end(); ++it)
            cout &lt;&lt; " " &lt;&lt; *it;
    }

    TP::~TP() {
        // TODO Auto-generated destructor stub
    }
</code></pre>

<p>it works in same function under one file if i use an class it shows me an error</p>

<pre><code>../src/Bee.cpp: In function ‘int main()’:
../src/Bee.cpp:31: error: conflicting declaration ‘std::TP u’
../src/Bee.cpp:24: error: ‘u’ has a previous declaration as ‘std::list&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::allocator&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; u’
}
#endif /* TP_H_ */

TP.h
</code></pre>
