<?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[Völlig unklares Programmverhalten]]></title><description><![CDATA[<p>Folgendes habe ich geschrieben<br />
Headerdatei</p>
<pre><code>int asn180Matrix[numberOfASNAttributes][number10SecIntervals];
</code></pre>
<p>Cpp-Datei:</p>
<pre><code>void StatisticsObject::updatePoisson180Matrix( int* autolartVector )
//...
for( int i = StatisticsObject::numberOfPoissonAttributes; i &lt; StatisticsObject::numberOfPoissonAttributes + StatisticsObject::numberOfASNAttributes; ++i ) {
		asn180Matrix[i][asn180Index] = autolartVector[i];
		cout &lt;&lt; &quot;autolartVector &quot; &lt;&lt; i &lt;&lt; &quot;: &quot; &lt;&lt; autolartVector[i] &lt;&lt; endl;
		cout &lt;&lt; &quot;asn180Matrix   &quot; &lt;&lt; i &lt;&lt; &quot;: &quot; &lt;&lt; asn180Matrix[i][asn180Index] &lt;&lt; endl;
	}
</code></pre>
<p>Und das hier ist die Ausgabe:</p>
<blockquote>
<p>autolartVector 2: 20<br />
asn180Matrix 2: 0<br />
autolartVector 3: 80<br />
asn180Matrix 3: 80</p>
</blockquote>
<p>Wie kann denn sowas passieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/266835/völlig-unklares-programmverhalten</link><generator>RSS for Node</generator><lastBuildDate>Wed, 02 Sep 2026 19:00:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/266835.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 15 May 2010 10:24:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Völlig unklares Programmverhalten on Sat, 15 May 2010 10:24:42 GMT]]></title><description><![CDATA[<p>Folgendes habe ich geschrieben<br />
Headerdatei</p>
<pre><code>int asn180Matrix[numberOfASNAttributes][number10SecIntervals];
</code></pre>
<p>Cpp-Datei:</p>
<pre><code>void StatisticsObject::updatePoisson180Matrix( int* autolartVector )
//...
for( int i = StatisticsObject::numberOfPoissonAttributes; i &lt; StatisticsObject::numberOfPoissonAttributes + StatisticsObject::numberOfASNAttributes; ++i ) {
		asn180Matrix[i][asn180Index] = autolartVector[i];
		cout &lt;&lt; &quot;autolartVector &quot; &lt;&lt; i &lt;&lt; &quot;: &quot; &lt;&lt; autolartVector[i] &lt;&lt; endl;
		cout &lt;&lt; &quot;asn180Matrix   &quot; &lt;&lt; i &lt;&lt; &quot;: &quot; &lt;&lt; asn180Matrix[i][asn180Index] &lt;&lt; endl;
	}
</code></pre>
<p>Und das hier ist die Ausgabe:</p>
<blockquote>
<p>autolartVector 2: 20<br />
asn180Matrix 2: 0<br />
autolartVector 3: 80<br />
asn180Matrix 3: 80</p>
</blockquote>
<p>Wie kann denn sowas passieren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1897444</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1897444</guid><dc:creator><![CDATA[HändyÄndy]]></dc:creator><pubDate>Sat, 15 May 2010 10:24:42 GMT</pubDate></item><item><title><![CDATA[Reply to Völlig unklares Programmverhalten on Sat, 15 May 2010 11:17:54 GMT]]></title><description><![CDATA[<p>HändyÄndy schrieb:</p>
<blockquote>
<p>Wie kann denn sowas passieren?</p>
</blockquote>
<p>Wieso nicht? Was hättest du denn erwartet?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1897473</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1897473</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sat, 15 May 2010 11:17:54 GMT</pubDate></item><item><title><![CDATA[Reply to Völlig unklares Programmverhalten on Sat, 15 May 2010 11:19:03 GMT]]></title><description><![CDATA[<p>Höchstwahrscheinlich ein OutOfIndex-Zugriff auf das Array, d.h. die Indizes stimmen nicht.<br />
Am besten debuggen und die Indizes dir ausgeben lassen.</p>
<p>Alternativ std::array bzw. std::vector benutzen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1897475</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1897475</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Sat, 15 May 2010 11:19:03 GMT</pubDate></item><item><title><![CDATA[Reply to Völlig unklares Programmverhalten on Sat, 15 May 2010 12:21:17 GMT]]></title><description><![CDATA[<p>Ich bekomme beim Ausführen auf folgenden Fehler, obwohl das Programm danach nicht sofort abstürzt:</p>
<blockquote>
<p>DDoSS(89084) malloc: *** error for object 0x500190: double free<br />
*** set a breakpoint in malloc_error_break to debug<br />
DDoSS(89084) malloc: *** error for object 0x500180: double free<br />
*** set a breakpoint in malloc_error_break to debug</p>
</blockquote>
<p>Wie kann ich herausfinden wo dieser Fehler auftritt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1897502</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1897502</guid><dc:creator><![CDATA[HändyÄndy]]></dc:creator><pubDate>Sat, 15 May 2010 12:21:17 GMT</pubDate></item><item><title><![CDATA[Reply to Völlig unklares Programmverhalten on Sat, 15 May 2010 12:43:12 GMT]]></title><description><![CDATA[<p>Steht ja in der Fehlermeldung.</p>
<blockquote>
<p>*** set a breakpoint in malloc_error_break to debug</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1897511</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1897511</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Sat, 15 May 2010 12:43:12 GMT</pubDate></item><item><title><![CDATA[Reply to Völlig unklares Programmverhalten on Sat, 15 May 2010 14:57:12 GMT]]></title><description><![CDATA[<p>Th69 schrieb:</p>
<blockquote>
<p>Höchstwahrscheinlich ein OutOfIndex-Zugriff auf das Array, d.h. die Indizes stimmen nicht.<br />
Am besten debuggen und die Indizes dir ausgeben lassen.</p>
<p>Alternativ std::array bzw. std::vector benutzen!</p>
</blockquote>
<p>Bin ich schlecht informiert oder gibt es array nur bei Boost?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1897569</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1897569</guid><dc:creator><![CDATA[wxSkip]]></dc:creator><pubDate>Sat, 15 May 2010 14:57:12 GMT</pubDate></item><item><title><![CDATA[Reply to Völlig unklares Programmverhalten on Sat, 15 May 2010 15:04:22 GMT]]></title><description><![CDATA[<p>Array gibt es in Boost oder im TR1.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1897571</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1897571</guid><dc:creator><![CDATA[Janjan]]></dc:creator><pubDate>Sat, 15 May 2010 15:04:22 GMT</pubDate></item><item><title><![CDATA[Reply to Völlig unklares Programmverhalten on Sat, 15 May 2010 15:05:16 GMT]]></title><description><![CDATA[<p>Janjan schrieb:</p>
<blockquote>
<p>Array gibt es in Boost oder im TR1.</p>
</blockquote>
<p>OK, C++0x, was ist da dann der Unterschied zu std::vector?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1897572</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1897572</guid><dc:creator><![CDATA[wxSkip]]></dc:creator><pubDate>Sat, 15 May 2010 15:05:16 GMT</pubDate></item><item><title><![CDATA[Reply to Völlig unklares Programmverhalten on Sat, 15 May 2010 15:10:37 GMT]]></title><description><![CDATA[<p>wxSkip schrieb:</p>
<blockquote>
<p>Janjan schrieb:</p>
<blockquote>
<p>Array gibt es in Boost oder im TR1.</p>
</blockquote>
<p>OK, C++0x, was ist da dann der Unterschied zu std::vector?</p>
</blockquote>
<p>TR1 ist nicht C++0x, sondern der Technical Report 1. Die meisten Kompiler unterstützen den TR1 schon seit etwas längerem.</p>
<p><code>std::tr1::array</code> und <code>boost::array</code> wrappen ein C-Array und machen es weniger flüchtig. So kann man nun einfach Arrays kopieren. Bieten auch <code>begin()</code> , <code>end()</code> , usw. an oder zum Beispiel <code>at(std::size_t)</code> .</p>
<p>Schau dir einfach mal die Referenz von <code>boost::array</code> an:<br />
<a href="http://www.boost.org/doc/libs/1_43_0/doc/html/boost/array.html" rel="nofollow">http://www.boost.org/doc/libs/1_43_0/doc/html/boost/array.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1897574</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1897574</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Sat, 15 May 2010 15:10:37 GMT</pubDate></item><item><title><![CDATA[Reply to Völlig unklares Programmverhalten on Sat, 15 May 2010 15:34:41 GMT]]></title><description><![CDATA[<p>Dravere schrieb:</p>
<blockquote>
<p>wxSkip schrieb:</p>
<blockquote>
<p>Janjan schrieb:</p>
<blockquote>
<p>Array gibt es in Boost oder im TR1.</p>
</blockquote>
<p>OK, C++0x, was ist da dann der Unterschied zu std::vector?</p>
</blockquote>
<p>TR1 ist nicht C++0x, sondern der Technical Report 1. Die meisten Kompiler unterstützen den TR1 schon seit etwas längerem.</p>
<p><code>std::tr1::array</code> und <code>boost::array</code> wrappen ein C-Array und machen es weniger flüchtig. So kann man nun einfach Arrays kopieren. Bieten auch <code>begin()</code> , <code>end()</code> , usw. an oder zum Beispiel <code>at(std::size_t)</code> .</p>
<p>Schau dir einfach mal die Referenz von <code>boost::array</code> an:<br />
<a href="http://www.boost.org/doc/libs/1_43_0/doc/html/boost/array.html" rel="nofollow">http://www.boost.org/doc/libs/1_43_0/doc/html/boost/array.html</a></p>
</blockquote>
<p>Ach so, ein statisches Array. Danke! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1897591</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1897591</guid><dc:creator><![CDATA[wxSkip]]></dc:creator><pubDate>Sat, 15 May 2010 15:34:41 GMT</pubDate></item></channel></rss>