<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[nochmal templates]]></title><description><![CDATA[<p>die Klasse</p>
<pre><code class="language-cpp">template&lt;class T&gt;	

class CBubble_Sort
{
public:

	CBubble_Sort();
	CBubble_Sort(vector&lt;T&gt; a)
	{
		m_array = a;
	};

	~CBubble_Sort(void);

	vector&lt;T&gt; sortieren(vector&lt;T&gt; v)
	{
		for(int i = 0; i &lt; v.max_size(); i++)
		{
			for(int i =0; i &lt; v.max_size(); i++)
			{
				if(v[i] &gt; v[i+1])
				{
					T temp;
					temp = v[i];
					v[i] = v[i+1];
					v[i+1] = temp;
				}
			}
		}
		return v;
	}
private:

	vector&lt;T&gt; m_array;

};
</code></pre>
<p>main</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &quot;Bubble_Sort.h&quot;

using namespace std;

int main(int argc, _TCHAR* argv[])
{
	vector&lt;int&gt; array;

		array[0] = 566;
		array[1] = 586;
		array[2] = 56;
		array[3] = 556;
		array[4] = 546;
		array[5] = 564;
		array[6] = 516;	

	CBubble_Sort&lt;int&gt; object(array);

		return 0;
}
</code></pre>
<p>der Fehler</p>
<p>Sortieralgorithmen.obj : error LNK2019: unresolved external symbol &quot;public: __thiscall CBubble_Sort&lt;int&gt;::~CBubble_Sort&lt;int&gt;(void)&quot; (??1?$CBubble_Sort@H@@QAE@XZ) referenced in function _main<br />
Debug/Sortieralgorithmen.exe : fatal error LNK1120: 1 unresolved externals</p>
<p>ich kann kein objekt ohne fehlermeldung anlegen</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/122173/nochmal-templates</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 00:34:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/122173.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Oct 2005 13:16:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to nochmal templates on Sat, 01 Oct 2005 13:18:27 GMT]]></title><description><![CDATA[<p>die Klasse</p>
<pre><code class="language-cpp">template&lt;class T&gt;	

class CBubble_Sort
{
public:

	CBubble_Sort();
	CBubble_Sort(vector&lt;T&gt; a)
	{
		m_array = a;
	};

	~CBubble_Sort(void);

	vector&lt;T&gt; sortieren(vector&lt;T&gt; v)
	{
		for(int i = 0; i &lt; v.max_size(); i++)
		{
			for(int i =0; i &lt; v.max_size(); i++)
			{
				if(v[i] &gt; v[i+1])
				{
					T temp;
					temp = v[i];
					v[i] = v[i+1];
					v[i+1] = temp;
				}
			}
		}
		return v;
	}
private:

	vector&lt;T&gt; m_array;

};
</code></pre>
<p>main</p>
<pre><code class="language-cpp">#include &quot;stdafx.h&quot;
#include &quot;Bubble_Sort.h&quot;

using namespace std;

int main(int argc, _TCHAR* argv[])
{
	vector&lt;int&gt; array;

		array[0] = 566;
		array[1] = 586;
		array[2] = 56;
		array[3] = 556;
		array[4] = 546;
		array[5] = 564;
		array[6] = 516;	

	CBubble_Sort&lt;int&gt; object(array);

		return 0;
}
</code></pre>
<p>der Fehler</p>
<p>Sortieralgorithmen.obj : error LNK2019: unresolved external symbol &quot;public: __thiscall CBubble_Sort&lt;int&gt;::~CBubble_Sort&lt;int&gt;(void)&quot; (??1?$CBubble_Sort@H@@QAE@XZ) referenced in function _main<br />
Debug/Sortieralgorithmen.exe : fatal error LNK1120: 1 unresolved externals</p>
<p>ich kann kein objekt ohne fehlermeldung anlegen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/884116</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/884116</guid><dc:creator><![CDATA[golden_jubilee]]></dc:creator><pubDate>Sat, 01 Oct 2005 13:18:27 GMT</pubDate></item><item><title><![CDATA[Reply to nochmal templates on Sat, 01 Oct 2005 13:18:24 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">vector&lt;int&gt; array;

        array[0] = 566;
        array[1] = 586;
        array[2] = 56;
        array[3] = 556;
        array[4] = 546;
        array[5] = 564;
        array[6] = 516;
</code></pre>
<p>benutze push_back.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/884118</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/884118</guid><dc:creator><![CDATA[offtopic]]></dc:creator><pubDate>Sat, 01 Oct 2005 13:18:24 GMT</pubDate></item><item><title><![CDATA[Reply to nochmal templates on Sat, 01 Oct 2005 13:20:09 GMT]]></title><description><![CDATA[<p>du hast den dtor nur deklariert. da müssen geschweifte Klämmerchen hin statt nem &quot;;&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/884119</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/884119</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Sat, 01 Oct 2005 13:20:09 GMT</pubDate></item></channel></rss>