<?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[const]]></title><description><![CDATA[<p>Hi,</p>
<p>wie wird eine const Variable bei der Programmausführung gespeichert ? Wird im Beispiel unten die 2. const Variable jedesmal neu berechnet oder nur einmal beim Programmstart ? Macht das einen schnelleren Code wenn die const Variable schon als Dezimalzahl definiert wird ?</p>
<pre><code class="language-cpp">const long double PI  = 3.14159265358979323846;
const long double RAD = PI / 180.0;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/239461/const</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 12:20:38 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/239461.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 23 Apr 2009 18:35:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to const on Thu, 23 Apr 2009 18:35:33 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>wie wird eine const Variable bei der Programmausführung gespeichert ? Wird im Beispiel unten die 2. const Variable jedesmal neu berechnet oder nur einmal beim Programmstart ? Macht das einen schnelleren Code wenn die const Variable schon als Dezimalzahl definiert wird ?</p>
<pre><code class="language-cpp">const long double PI  = 3.14159265358979323846;
const long double RAD = PI / 180.0;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1700363</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1700363</guid><dc:creator><![CDATA[C++ Learner]]></dc:creator><pubDate>Thu, 23 Apr 2009 18:35:33 GMT</pubDate></item><item><title><![CDATA[Reply to const on Thu, 23 Apr 2009 18:43:22 GMT]]></title><description><![CDATA[<p>C++ Learner schrieb:</p>
<blockquote>
<p>Hi,<br />
wie wird eine const Variable bei der Programmausführung gespeichert ?</p>
</blockquote>
<p>das kann man so gar nicht sagen. in deinem beispiel kann es sein, daß die const variablen gar keinen eigegen speicher beanspruchen.</p>
<blockquote>
<p>Wird im Beispiel unten die 2. const Variable jedesmal neu berechnet oder nur einmal beim Programmstart ?</p>
</blockquote>
<p>nur einmal zu programmstart. oder sogar, wenns geht, und hier gehts, schon zur compilezeit!</p>
<blockquote>
<p>Macht das einen schnelleren Code wenn die const Variable schon als Dezimalzahl definiert wird ?</p>
</blockquote>
<p>nein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1700369</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1700369</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Thu, 23 Apr 2009 18:43:22 GMT</pubDate></item><item><title><![CDATA[Reply to const on Thu, 23 Apr 2009 18:50:44 GMT]]></title><description><![CDATA[<p>Danke Volkard !</p>
<p>Das ist gut so, denn so kann ich mit der const mehr aussagen als wie mit einer einzigen Dezimalzahl.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1700374</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1700374</guid><dc:creator><![CDATA[C++ Learner]]></dc:creator><pubDate>Thu, 23 Apr 2009 18:50:44 GMT</pubDate></item></channel></rss>