<?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[Bubblesort - Veranschaulichung]]></title><description><![CDATA[<p>Da das Thema Sortieren, z.B. anhand von Bubble sort immer wieder kommt, hier ein Testfeld, damit man genau sieht, was passiert:</p>
<pre><code class="language-cpp">#include &lt;conio.h&gt;
#include &lt;iostream&gt;
#include &lt;algorithm&gt;
using namespace std;

class xINT //Testklasse für zu sortierende Datenelemente
{

private:
  int num;
  static int countCtor;
  static int countDtor;
  static int countCopycon;
  static int countOpAssign;

public:
  xINT()
  {
      std::cout &lt;&lt; this &lt;&lt; &quot;: &quot; &lt;&lt; &quot;ctor&quot; &lt;&lt; std::endl;
      ++countCtor;
  }

 ~xINT()
  {
      std::cout &lt;&lt; this &lt;&lt; &quot;: &quot; &lt;&lt; &quot;dtor&quot; &lt;&lt; std::endl;
      ++countDtor;
  }

  xINT(const xINT&amp; x)
  {
      std::cout &lt;&lt; this &lt;&lt; &quot;: &quot; &lt;&lt; &quot;copycon von &quot; &lt;&lt; std::dec &lt;&lt; &amp;x &lt;&lt; std::endl;
      num = x.getNum();
      ++countCopycon;
  }

  xINT&amp; operator=(const xINT&amp; x)
  {
      if (&amp;x == this)
      {
          std::cout &lt;&lt; &quot;Selbstzuweisung mit op=&quot; &lt;&lt; std::endl;
      }
      std::cout &lt;&lt; this &lt;&lt; &quot;: &quot; &lt;&lt; &quot;op= von &quot; &lt;&lt; std::dec &lt;&lt; &amp;x &lt;&lt; std::endl;
      num = x.getNum();
      ++countOpAssign;
      return *this;
  }

  int getNum() const {return num;}
  void setNum(int val) {num = val;}
  static void statistik(std::ostream&amp;);
  static void reset();
};

int xINT::countCtor     = 0;
int xINT::countDtor     = 0;
int xINT::countCopycon  = 0;
int xINT::countOpAssign = 0;

void xINT::statistik(std::ostream&amp; os)
{
  os   &lt;&lt; &quot;Ctor:    &quot; &lt;&lt; countCtor    &lt;&lt; std::endl
       &lt;&lt; &quot;Dtor:    &quot; &lt;&lt; countDtor    &lt;&lt; std::endl
       &lt;&lt; &quot;Copycon: &quot; &lt;&lt; countCopycon &lt;&lt; std::endl
       &lt;&lt; &quot;op=:     &quot; &lt;&lt; countOpAssign;
}

void xINT::reset()
{
    countCtor     = 0;
    countDtor     = 0;
    countCopycon  = 0;
    countOpAssign = 0;
}

std::ostream&amp; operator&lt;&lt; (std::ostream&amp; os, const xINT&amp; x)
{
  os &lt;&lt; x.getNum();
  return os;
}

std::istream&amp; operator&gt;&gt; (std::istream&amp; is, xINT&amp; x)
{
  int i;
  is &gt;&gt; i;
  x.setNum(i);
  return is;
}

bool operator&lt; (const xINT&amp; a, const xINT&amp; b)
{
    return a.getNum() &lt; b.getNum();
}

bool operator&gt; (const xINT&amp; a, const xINT&amp; b)
{
    return a.getNum() &gt; b.getNum();
}

bool operator== (const xINT&amp; a, const xINT&amp; b)
{
    return a.getNum() == b.getNum();
}

bool operator!= (const xINT&amp; a, const xINT&amp; b)
{
    return a.getNum() != b.getNum();
}
//----------------------------------------------------

template &lt;typename T&gt;
void output(T* array, int N)
{
   int i;
   cout &lt;&lt; endl;
   for(i=0;i&lt;N;++i) cout &lt;&lt; array[i] &lt;&lt; ' ';
   cout &lt;&lt; endl; cout &lt;&lt; endl;
}

//----------------------------------------------------

template &lt;typename T&gt;
void bubbleSort(T* array, int N)
{
   for(int i=N-1; i&gt;0; --i)
   {
      bool austausch = false;
      for(int j=0; j&lt;i; ++j)
      {
         if(array[j+1] &lt; array[j])
         {
            swap(array[j], array[j+1]);
            austausch = true;
            output(array,N); // Hier mit Ausgabe zum verfolgen
         }
      };
      if(!austausch) break;
   };
};

//----------------------------------------------------

int main()
{
   const int N = 7;
   int i;
   xINT array[N];

   for(i=0;i&lt;N;++i) array[i].setNum( rand() % N );

   output(array,N);

   bubbleSort(array,N);

   output(array,N);

   getch();
}
</code></pre>
<p>Beispiel:</p>
<pre><code>0x22ff30: ctor    // Element a (zu Beginn)
0x22ff34: ctor    // Element b (zu Beginn)
0x22ff38: ctor
0x22ff3c: ctor
0x22ff40: ctor
0x22ff44: ctor
0x22ff48: ctor

6 1 6 5 3 2 5

0x22fe50: copycon von 0x22ff30   // Element a wird nach temp (0x22fe50) gesichert
0x22ff30: op= von 0x22ff34       // Element b kommt auf alten Platz von Element a
0x22ff34: op= von 0x22fe50       // Element a kommt (von temp) auf alten Platz von Element b
0x22fe50: dtor                   // temp wird gelöscht

1 6 6 5 3 2 5

0x22fe50: copycon von 0x22ff38
0x22ff38: op= von 0x22ff3c
0x22ff3c: op= von 0x22fe50
0x22fe50: dtor

1 6 5 6 3 2 5

0x22fe50: copycon von 0x22ff3c
0x22ff3c: op= von 0x22ff40
0x22ff40: op= von 0x22fe50
0x22fe50: dtor

1 6 5 3 6 2 5

0x22fe50: copycon von 0x22ff40
0x22ff40: op= von 0x22ff44
0x22ff44: op= von 0x22fe50
0x22fe50: dtor

1 6 5 3 2 6 5

0x22fe50: copycon von 0x22ff44
0x22ff44: op= von 0x22ff48
0x22ff48: op= von 0x22fe50
0x22fe50: dtor

1 6 5 3 2 5 6

0x22fe50: copycon von 0x22ff34
0x22ff34: op= von 0x22ff38
0x22ff38: op= von 0x22fe50
0x22fe50: dtor

1 5 6 3 2 5 6

0x22fe50: copycon von 0x22ff38
0x22ff38: op= von 0x22ff3c
0x22ff3c: op= von 0x22fe50
0x22fe50: dtor

1 5 3 6 2 5 6

0x22fe50: copycon von 0x22ff3c
0x22ff3c: op= von 0x22ff40
0x22ff40: op= von 0x22fe50
0x22fe50: dtor

1 5 3 2 6 5 6

0x22fe50: copycon von 0x22ff40
0x22ff40: op= von 0x22ff44
0x22ff44: op= von 0x22fe50
0x22fe50: dtor

1 5 3 2 5 6 6

0x22fe50: copycon von 0x22ff34
0x22ff34: op= von 0x22ff38
0x22ff38: op= von 0x22fe50
0x22fe50: dtor

1 3 5 2 5 6 6

0x22fe50: copycon von 0x22ff38
0x22ff38: op= von 0x22ff3c
0x22ff3c: op= von 0x22fe50
0x22fe50: dtor

1 3 2 5 5 6 6

0x22fe50: copycon von 0x22ff34
0x22ff34: op= von 0x22ff38
0x22ff38: op= von 0x22fe50
0x22fe50: dtor

1 2 3 5 5 6 6

0x22ff30: ctor
0x22ff34: ctor
0x22ff38: ctor
0x22ff3c: ctor
0x22ff40: ctor
0x22ff44: ctor
0x22ff48: ctor
</code></pre>
<p>Man sieht, dass der Aufwand in der Testklasse xINT sich auf den Austausch benachbarter Elemente beschränkt. Man benötigt nur eine zusätzliche Speicherstelle für die beim Swap notwendige temporäre Variable.</p>
<p>Vielleicht hat jemand gute Ideen, was man hier zur Veranschaulichung noch dazu basteln könnte.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/217004/bubblesort-veranschaulichung</link><generator>RSS for Node</generator><lastBuildDate>Fri, 09 Oct 2026 06:29:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/217004.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 01 Jul 2008 21:20:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Tue, 01 Jul 2008 21:27:30 GMT]]></title><description><![CDATA[<p>Da das Thema Sortieren, z.B. anhand von Bubble sort immer wieder kommt, hier ein Testfeld, damit man genau sieht, was passiert:</p>
<pre><code class="language-cpp">#include &lt;conio.h&gt;
#include &lt;iostream&gt;
#include &lt;algorithm&gt;
using namespace std;

class xINT //Testklasse für zu sortierende Datenelemente
{

private:
  int num;
  static int countCtor;
  static int countDtor;
  static int countCopycon;
  static int countOpAssign;

public:
  xINT()
  {
      std::cout &lt;&lt; this &lt;&lt; &quot;: &quot; &lt;&lt; &quot;ctor&quot; &lt;&lt; std::endl;
      ++countCtor;
  }

 ~xINT()
  {
      std::cout &lt;&lt; this &lt;&lt; &quot;: &quot; &lt;&lt; &quot;dtor&quot; &lt;&lt; std::endl;
      ++countDtor;
  }

  xINT(const xINT&amp; x)
  {
      std::cout &lt;&lt; this &lt;&lt; &quot;: &quot; &lt;&lt; &quot;copycon von &quot; &lt;&lt; std::dec &lt;&lt; &amp;x &lt;&lt; std::endl;
      num = x.getNum();
      ++countCopycon;
  }

  xINT&amp; operator=(const xINT&amp; x)
  {
      if (&amp;x == this)
      {
          std::cout &lt;&lt; &quot;Selbstzuweisung mit op=&quot; &lt;&lt; std::endl;
      }
      std::cout &lt;&lt; this &lt;&lt; &quot;: &quot; &lt;&lt; &quot;op= von &quot; &lt;&lt; std::dec &lt;&lt; &amp;x &lt;&lt; std::endl;
      num = x.getNum();
      ++countOpAssign;
      return *this;
  }

  int getNum() const {return num;}
  void setNum(int val) {num = val;}
  static void statistik(std::ostream&amp;);
  static void reset();
};

int xINT::countCtor     = 0;
int xINT::countDtor     = 0;
int xINT::countCopycon  = 0;
int xINT::countOpAssign = 0;

void xINT::statistik(std::ostream&amp; os)
{
  os   &lt;&lt; &quot;Ctor:    &quot; &lt;&lt; countCtor    &lt;&lt; std::endl
       &lt;&lt; &quot;Dtor:    &quot; &lt;&lt; countDtor    &lt;&lt; std::endl
       &lt;&lt; &quot;Copycon: &quot; &lt;&lt; countCopycon &lt;&lt; std::endl
       &lt;&lt; &quot;op=:     &quot; &lt;&lt; countOpAssign;
}

void xINT::reset()
{
    countCtor     = 0;
    countDtor     = 0;
    countCopycon  = 0;
    countOpAssign = 0;
}

std::ostream&amp; operator&lt;&lt; (std::ostream&amp; os, const xINT&amp; x)
{
  os &lt;&lt; x.getNum();
  return os;
}

std::istream&amp; operator&gt;&gt; (std::istream&amp; is, xINT&amp; x)
{
  int i;
  is &gt;&gt; i;
  x.setNum(i);
  return is;
}

bool operator&lt; (const xINT&amp; a, const xINT&amp; b)
{
    return a.getNum() &lt; b.getNum();
}

bool operator&gt; (const xINT&amp; a, const xINT&amp; b)
{
    return a.getNum() &gt; b.getNum();
}

bool operator== (const xINT&amp; a, const xINT&amp; b)
{
    return a.getNum() == b.getNum();
}

bool operator!= (const xINT&amp; a, const xINT&amp; b)
{
    return a.getNum() != b.getNum();
}
//----------------------------------------------------

template &lt;typename T&gt;
void output(T* array, int N)
{
   int i;
   cout &lt;&lt; endl;
   for(i=0;i&lt;N;++i) cout &lt;&lt; array[i] &lt;&lt; ' ';
   cout &lt;&lt; endl; cout &lt;&lt; endl;
}

//----------------------------------------------------

template &lt;typename T&gt;
void bubbleSort(T* array, int N)
{
   for(int i=N-1; i&gt;0; --i)
   {
      bool austausch = false;
      for(int j=0; j&lt;i; ++j)
      {
         if(array[j+1] &lt; array[j])
         {
            swap(array[j], array[j+1]);
            austausch = true;
            output(array,N); // Hier mit Ausgabe zum verfolgen
         }
      };
      if(!austausch) break;
   };
};

//----------------------------------------------------

int main()
{
   const int N = 7;
   int i;
   xINT array[N];

   for(i=0;i&lt;N;++i) array[i].setNum( rand() % N );

   output(array,N);

   bubbleSort(array,N);

   output(array,N);

   getch();
}
</code></pre>
<p>Beispiel:</p>
<pre><code>0x22ff30: ctor    // Element a (zu Beginn)
0x22ff34: ctor    // Element b (zu Beginn)
0x22ff38: ctor
0x22ff3c: ctor
0x22ff40: ctor
0x22ff44: ctor
0x22ff48: ctor

6 1 6 5 3 2 5

0x22fe50: copycon von 0x22ff30   // Element a wird nach temp (0x22fe50) gesichert
0x22ff30: op= von 0x22ff34       // Element b kommt auf alten Platz von Element a
0x22ff34: op= von 0x22fe50       // Element a kommt (von temp) auf alten Platz von Element b
0x22fe50: dtor                   // temp wird gelöscht

1 6 6 5 3 2 5

0x22fe50: copycon von 0x22ff38
0x22ff38: op= von 0x22ff3c
0x22ff3c: op= von 0x22fe50
0x22fe50: dtor

1 6 5 6 3 2 5

0x22fe50: copycon von 0x22ff3c
0x22ff3c: op= von 0x22ff40
0x22ff40: op= von 0x22fe50
0x22fe50: dtor

1 6 5 3 6 2 5

0x22fe50: copycon von 0x22ff40
0x22ff40: op= von 0x22ff44
0x22ff44: op= von 0x22fe50
0x22fe50: dtor

1 6 5 3 2 6 5

0x22fe50: copycon von 0x22ff44
0x22ff44: op= von 0x22ff48
0x22ff48: op= von 0x22fe50
0x22fe50: dtor

1 6 5 3 2 5 6

0x22fe50: copycon von 0x22ff34
0x22ff34: op= von 0x22ff38
0x22ff38: op= von 0x22fe50
0x22fe50: dtor

1 5 6 3 2 5 6

0x22fe50: copycon von 0x22ff38
0x22ff38: op= von 0x22ff3c
0x22ff3c: op= von 0x22fe50
0x22fe50: dtor

1 5 3 6 2 5 6

0x22fe50: copycon von 0x22ff3c
0x22ff3c: op= von 0x22ff40
0x22ff40: op= von 0x22fe50
0x22fe50: dtor

1 5 3 2 6 5 6

0x22fe50: copycon von 0x22ff40
0x22ff40: op= von 0x22ff44
0x22ff44: op= von 0x22fe50
0x22fe50: dtor

1 5 3 2 5 6 6

0x22fe50: copycon von 0x22ff34
0x22ff34: op= von 0x22ff38
0x22ff38: op= von 0x22fe50
0x22fe50: dtor

1 3 5 2 5 6 6

0x22fe50: copycon von 0x22ff38
0x22ff38: op= von 0x22ff3c
0x22ff3c: op= von 0x22fe50
0x22fe50: dtor

1 3 2 5 5 6 6

0x22fe50: copycon von 0x22ff34
0x22ff34: op= von 0x22ff38
0x22ff38: op= von 0x22fe50
0x22fe50: dtor

1 2 3 5 5 6 6

0x22ff30: ctor
0x22ff34: ctor
0x22ff38: ctor
0x22ff3c: ctor
0x22ff40: ctor
0x22ff44: ctor
0x22ff48: ctor
</code></pre>
<p>Man sieht, dass der Aufwand in der Testklasse xINT sich auf den Austausch benachbarter Elemente beschränkt. Man benötigt nur eine zusätzliche Speicherstelle für die beim Swap notwendige temporäre Variable.</p>
<p>Vielleicht hat jemand gute Ideen, was man hier zur Veranschaulichung noch dazu basteln könnte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539351</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Tue, 01 Jul 2008 21:27:30 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Tue, 01 Jul 2008 21:57:51 GMT]]></title><description><![CDATA[<p>Erhard Henkes schrieb:</p>
<blockquote>
<p>...damit man genau sieht, was passiert:</p>
</blockquote>
<p>^^sowas ist doch bullshit.<br />
hier sieht man viel besser, wie sorts funktionieren<br />
<a href="http://www.site.uottawa.ca/~stan/csi2514/applets/sort/sort.html" rel="nofollow">http://www.site.uottawa.ca/~stan/csi2514/applets/sort/sort.html</a><br />
<a href="http://www.solidware.com/sort/" rel="nofollow">http://www.solidware.com/sort/</a><br />
<a href="http://www.cs.ubc.ca/~harrison/Java/sorting-demo.html" rel="nofollow">http://www.cs.ubc.ca/~harrison/Java/sorting-demo.html</a><br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539361</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539361</guid><dc:creator><![CDATA[fricky]]></dc:creator><pubDate>Tue, 01 Jul 2008 21:57:51 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Tue, 01 Jul 2008 22:56:50 GMT]]></title><description><![CDATA[<p>Ja, sehr schön. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> Davon gibt es vermutlich schon genug.<br />
Hier z.B. ein weiterer Link: <a href="http://siebn.de/index.php?page=anisort/anisort" rel="nofollow">http://siebn.de/index.php?page=anisort/anisort</a></p>
<p>Ich möchte, dass ein Anfänger jeden Schritt, aber auch genau das damit zusammenhängende Speichermanagement erkennt und selbst den kompletten <strong>C++-Sourcecode</strong> in Händen hält, um auch eigene Experimente durchzuführen. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539375</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539375</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Tue, 01 Jul 2008 22:56:50 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Tue, 01 Jul 2008 23:53:23 GMT]]></title><description><![CDATA[<p>weil es mir grad aufgefallen ist (und nix mit dem thema zu tun hat), es geht um die signatur....</p>
<p>man schreibt &quot;guten code&quot; so:</p>
<p>getter:</p>
<pre><code>public:
type const&amp; name() const {}
</code></pre>
<p>operator:</p>
<pre><code>public: 
type&amp; operator+=(type const&amp; rhs); 
&quot;freestanding:&quot; 
type const 
operator+(type const&amp; lhs, type const&amp; rhs);
</code></pre>
<p>also zusammengefasst: die ganzen const statments &quot;ließt&quot; man von rechts nach links... bsp: der getter name ist constant auf eine constante referenz vom typ ... hab das aus diversen styleguids und mein prof+tutoren ham mich geprügelt wenn ich das anders gemacht hab... klar hat so jeder sein stil, aber diese variante find ich echt die schlauere...</p>
<p>//lhs: left hand side<br />
//rhs: right hand side</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539380</guid><dc:creator><![CDATA[princess]]></dc:creator><pubDate>Tue, 01 Jul 2008 23:53:23 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 01:33:40 GMT]]></title><description><![CDATA[<p>princess schrieb:</p>
<blockquote>
<p>type const<br />
operator+(type const&amp; lhs, type const&amp; rhs); [/code]</p>
</blockquote>
<p>hoffe, dass camper das nicht sieht. ansonsten erklär mal, warum du <code>type const</code> brauchst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539387</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539387</guid><dc:creator><![CDATA[queer_boy]]></dc:creator><pubDate>Wed, 02 Jul 2008 01:33:40 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 01:53:18 GMT]]></title><description><![CDATA[<p>const ist der anfang allen übels <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539388</guid><dc:creator><![CDATA[sothis_]]></dc:creator><pubDate>Wed, 02 Jul 2008 01:53:18 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 03:13:24 GMT]]></title><description><![CDATA[<p>ohje prinzesschen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539389</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539389</guid><dc:creator><![CDATA[BorisDieKlinge]]></dc:creator><pubDate>Wed, 02 Jul 2008 03:13:24 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 07:30:53 GMT]]></title><description><![CDATA[<p>Genau diese weitgehend sinnlose Streiterei ist das Problem bei der C++ Community. Kein Wunder, wenn sich da bald keiner mehr drauf einlassen möchte. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539460</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Wed, 02 Jul 2008 07:30:53 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 08:02:04 GMT]]></title><description><![CDATA[<p>Erhard Henkes schrieb:</p>
<blockquote>
<p>Ich möchte, dass ein Anfänger jeden Schritt, aber auch genau das damit zusammenhängende Speichermanagement erkennt und selbst den kompletten <strong>C++-Sourcecode</strong> in Händen hält, um auch eigene Experimente durchzuführen.</p>
</blockquote>
<p>dann schau dir mal den c++ code auf dem von dir verlinkten applet an. wieso ist dein code so kompliziert? also für anfänger ist sowas absolut nix.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539473</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539473</guid><dc:creator><![CDATA[fricky]]></dc:creator><pubDate>Wed, 02 Jul 2008 08:02:04 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 08:24:01 GMT]]></title><description><![CDATA[<p>Ich habe trotz aller möglichen Veranschaulichungen über Jahre hinweg (es gab zu QuickBasic, ca. 2 Jahre bevor pivke geboren ist, schon ein &quot;Sortdemo&quot;, in dem mit eine zufällige Anordnung unterschiedlich langer Balken mit verschiedenen Algorithmen sortiert und animiert wurde) nie die einfachsten Sortieralgorithmen verstanden. Das kam erst durch eine abstraktere Sicht auf Sortieralgorithmen allgemein. Vielleicht bin ich ja sehr speziell, aber der Wert solcher Animationen leuchtet mir nicht so recht ein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539483</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539483</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Wed, 02 Jul 2008 08:24:01 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 08:35:22 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>mir geht's halt andersherum: Ich verstehe die Sortiermechanismen über diese &quot;Schritt-für-Schritt&quot;-Animationen sehr viel besser.</p>
<p>Da sind unsere Denk-/Lernstrukturen wohl einfach anders. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539489</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539489</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Wed, 02 Jul 2008 08:35:22 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 12:41:01 GMT]]></title><description><![CDATA[<p>Ist schon o.k. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539674</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539674</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Wed, 02 Jul 2008 12:41:01 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 12:44:40 GMT]]></title><description><![CDATA[<p>queer_boy schrieb:</p>
<blockquote>
<p>princess schrieb:</p>
<blockquote>
<p>type const<br />
operator+(type const&amp; lhs, type const&amp; rhs); [/code]</p>
</blockquote>
<p>hoffe, dass camper das nicht sieht. ansonsten erklär mal, warum du <code>type const</code> brauchst.</p>
</blockquote>
<p>Ich nehme an, es kommt meiner Bequemlichkeit entgegen, dass ich hier nun nichts mehr dazu zu schreiben brauche :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539678</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539678</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Wed, 02 Jul 2008 12:44:40 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 13:01:46 GMT]]></title><description><![CDATA[<p>BorisDieKlinge schrieb:</p>
<blockquote>
<p>ohje prinzesschen...</p>
</blockquote>
<p>was geht'n mit dir?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539696</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539696</guid><dc:creator><![CDATA[sothis_]]></dc:creator><pubDate>Wed, 02 Jul 2008 13:01:46 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 13:01:47 GMT]]></title><description><![CDATA[<p>queer_boy schrieb:</p>
<blockquote>
<p>... hoffe, dass camper das nicht sieht. ansonsten erklär mal, warum du <code>type const</code> brauchst. ...</p>
</blockquote>
<p>Das macht natürlich besonders bei Oparatoren Sinn, damit das Ergebnis nicht als l-value eingesetzt werden kann.</p>
<p>Also, z.B. würden mit <em>type const</em> dann solche Ausdrücke verhindert:</p>
<pre><code class="language-cpp">5 + 7 = 99;
</code></pre>
<p>Was hat es mit camper auf sich? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539697</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539697</guid><dc:creator><![CDATA[vic1986]]></dc:creator><pubDate>Wed, 02 Jul 2008 13:01:47 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 13:13:01 GMT]]></title><description><![CDATA[<p>//müll</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539708</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539708</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Wed, 02 Jul 2008 13:13:01 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 13:19:45 GMT]]></title><description><![CDATA[<p>vic1986 schrieb:</p>
<blockquote>
<p>Das macht natürlich besonders bei Oparatoren Sinn, damit das Ergebnis nicht als l-value eingesetzt werden kann.</p>
</blockquote>
<p>Wenn man verhindern will, dass der Zuweisungsoperator auf das Ergebnis angewandt werden kann, dann ist const m.W. tatsächlich die einzig effektive Methode. Das Erschießen des Nachbarhundes ist ebenfalls effektiv, wenn man durch dessen Bellen belästigt wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539712</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539712</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Wed, 02 Jul 2008 13:19:45 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 13:33:23 GMT]]></title><description><![CDATA[<p>camper schrieb:</p>
<blockquote>
<p>... Das Erschießen des Nachbarhundes ist ebenfalls effektiv, wenn man durch dessen Bellen belästigt wird. ...</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> Hübsches Bild, aber was heißt das konkret?</p>
<p>Nicht, dass ich diese Art der Beseitigung von Hunden nicht unterstützen würde ... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>otze schrieb:</p>
<blockquote>
<p>//müll</p>
</blockquote>
<p>Wieso Müll? Die Kritik etwas ausführlicher darlegen bitte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539733</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539733</guid><dc:creator><![CDATA[vic1986]]></dc:creator><pubDate>Wed, 02 Jul 2008 13:33:23 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 13:34:44 GMT]]></title><description><![CDATA[<p>vic1986 schrieb:</p>
<blockquote>
<p>otze schrieb:</p>
<blockquote>
<p>//müll</p>
</blockquote>
<p>Wieso Müll? Die Kritik etwas ausführlicher darlegen bitte.</p>
</blockquote>
<p>ich glaube er hat sich da selbst kritisiert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539734</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539734</guid><dc:creator><![CDATA[sothis_]]></dc:creator><pubDate>Wed, 02 Jul 2008 13:34:44 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 13:43:50 GMT]]></title><description><![CDATA[<p>Bashar schrieb:</p>
<blockquote>
<p>Ich habe trotz aller möglichen Veranschaulichungen über Jahre hinweg (es gab zu QuickBasic, ca. 2 Jahre bevor pivke geboren ist, schon ein &quot;Sortdemo&quot;, in dem mit eine zufällige Anordnung unterschiedlich langer Balken mit verschiedenen Algorithmen sortiert und animiert wurde) nie die einfachsten Sortieralgorithmen verstanden. Das kam erst durch eine abstraktere Sicht auf Sortieralgorithmen allgemein.</p>
</blockquote>
<p>lenken dich animationen und bunte bilder ab, oder verwirren sie dich gar?<br />
dann bist du vielleicht ein sogenannter 'Savant'?<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539740</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539740</guid><dc:creator><![CDATA[fricky]]></dc:creator><pubDate>Wed, 02 Jul 2008 13:43:50 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 13:57:54 GMT]]></title><description><![CDATA[<p>fricky schrieb:</p>
<blockquote>
<p>lenken dich animationen und bunte bilder ab, oder verwirren sie dich gar?<br />
dann bist du vielleicht ein sogenannter 'Savant'?</p>
</blockquote>
<p>Vielleicht bist du ein sogenannter 'Troll'?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539749</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Wed, 02 Jul 2008 13:57:54 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 14:04:24 GMT]]></title><description><![CDATA[<p>Bashar schrieb:</p>
<blockquote>
<p>fricky schrieb:</p>
<blockquote>
<p>lenken dich animationen und bunte bilder ab, oder verwirren sie dich gar?<br />
dann bist du vielleicht ein sogenannter 'Savant'?</p>
</blockquote>
<p>Vielleicht bist du ein sogenannter 'Troll'?</p>
</blockquote>
<p>nicht gleich beleidigt sein. savants sind hochintelligente menschen.</p>
<p>wickipädia schrieb:</p>
<blockquote>
<p>Eine weitere gängige Theorie besagt, dass bei Inselbegabten die Filtermechanismen des Gehirns gestört seien. Dadurch würden nur ausgewählte Informationen des Unbewussten und nur einzelne, für relevant gehaltene, Informationen des Gedächtnisses dem bewussten Bereich des Gehirns zugeführt, um dessen Überforderung zu verhindern und den Menschen im Alltag schneller und intuitiver entscheiden zu lassen. Manche Wissenschaftler gehen davon aus, dass jeder Mensch ausnahmslos alle Sinneseindrücke in seinem Gedächtnis speichert, aber nur Zugriff auf die Wichtigen hat, während ein Savant in einem Teilbereich auf jede Information zugreifen kann, unabhängig von ihrer Relevanz oder emotionalen Bedeutung.</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539755</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539755</guid><dc:creator><![CDATA[fricky]]></dc:creator><pubDate>Wed, 02 Jul 2008 14:04:24 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Wed, 02 Jul 2008 14:04:38 GMT]]></title><description><![CDATA[<p>sothis_ schrieb:</p>
<blockquote>
<p>vic1986 schrieb:</p>
<blockquote>
<p>otze schrieb:</p>
<blockquote>
<p>//müll</p>
</blockquote>
<p>Wieso Müll? Die Kritik etwas ausführlicher darlegen bitte.</p>
</blockquote>
<p>ich glaube er hat sich da selbst kritisiert <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>jap. vorher stand da, dass temporäre Objekte kein lvalue sein können. Dann kam der zweifel und DANN das testprogramm. schlussendlich der edit <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1539756</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1539756</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Wed, 02 Jul 2008 14:04:38 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Sun, 20 Jul 2008 17:58:41 GMT]]></title><description><![CDATA[<p>vic1986 schrieb:</p>
<blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> Hübsches Bild, aber was heißt das konkret?</p>
</blockquote>
<p><a href="http://c-plusplus.net/forum/viewtopic-var-p-is-1275887.html#1275887" rel="nofollow">http://c-plusplus.net/forum/viewtopic-var-p-is-1275887.html#1275887</a> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1550390</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1550390</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 20 Jul 2008 17:58:41 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Sun, 20 Jul 2008 21:41:03 GMT]]></title><description><![CDATA[<p>Danke für die Aufklärung. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Die vorgetragenen Argumente sind allerdings etwas mau um die die drastische Wortwahl zu rechtfertigen.</p>
<p>Also, alles halb so wild. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1550545</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1550545</guid><dc:creator><![CDATA[vic1986]]></dc:creator><pubDate>Sun, 20 Jul 2008 21:41:03 GMT</pubDate></item><item><title><![CDATA[Reply to Bubblesort - Veranschaulichung on Mon, 21 Jul 2008 06:49:41 GMT]]></title><description><![CDATA[<p>vic1986 schrieb:</p>
<blockquote>
<p>Die vorgetragenen Argumente sind allerdings etwas mau um die die drastische Wortwahl zu rechtfertigen.</p>
</blockquote>
<p>Die Wortwahl wird ja auch nicht durch die Argumente gerechtfertigt, sondern durch den Zweck, dich für das Thema zu interessieren - das scheint funktioniert zu haben <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /><br />
Im Prinzip ist mir die Entscheidung für oder gegen const letztlich egal, nur sollte man es imo nicht uninformiert als etwas uneingeschränkt Empfehlenswertes darstellen. Das halte gerade in Hinblick auf das Publikum (durchaus viele Anfänger, die solche Empfehlungen unreflektiert aufnehmen) hier für bedenklich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1550652</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1550652</guid><dc:creator><![CDATA[camper]]></dc:creator><pubDate>Mon, 21 Jul 2008 06:49:41 GMT</pubDate></item></channel></rss>