<?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[Unterschied int a = 0 und int a = {0} ???]]></title><description><![CDATA[<p>Hey Leute,</p>
<p>was genau bedeutet der Ausdruck int a = {0}, wann verwendet man ihn und was ist der Unterschied zu int a = 0 ?</p>
<p>Vielen Dank und liebe Grüße</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/331379/unterschied-int-a-0-und-int-a-0</link><generator>RSS for Node</generator><lastBuildDate>Fri, 01 May 2026 16:47:42 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/331379.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 25 Feb 2015 12:22:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unterschied int a = 0 und int a = {0} ??? on Wed, 25 Feb 2015 12:22:28 GMT]]></title><description><![CDATA[<p>Hey Leute,</p>
<p>was genau bedeutet der Ausdruck int a = {0}, wann verwendet man ihn und was ist der Unterschied zu int a = 0 ?</p>
<p>Vielen Dank und liebe Grüße</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444305</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444305</guid><dc:creator><![CDATA[C.plusplus 0]]></dc:creator><pubDate>Wed, 25 Feb 2015 12:22:28 GMT</pubDate></item><item><title><![CDATA[Reply to Unterschied int a = 0 und int a = {0} ??? on Wed, 25 Feb 2015 13:06:17 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>in deinem Beispiel (int) macht das überhaupt keinen Unterschied. Erst hier:</p>
<pre><code>A a = x;
B b = {x};
</code></pre>
<p>Für A wird (ggf. nach Konvertierung) der Copy-Ctor aufgerufen.<br />
Für B wird ggf. der initinalizer_list-Ctor aufgerufen, sonst Copy-Ctor (stets ohne Konvertierung).</p>
<p>(Kann gerne nochmnal jemand kontrollieren; hab kein Buch hier und ich finde es warum auch immer schwer sich zu merken).</p>
<p>Edit:<br />
Ein Unterschied in deinem (erweiterten) Beispiel gibts doch:</p>
<pre><code>int a = 1.23; // ok
int a = {1.23}; // error
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2444317</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444317</guid><dc:creator><![CDATA[Jockelx]]></dc:creator><pubDate>Wed, 25 Feb 2015 13:06:17 GMT</pubDate></item><item><title><![CDATA[Reply to Unterschied int a = 0 und int a = {0} ??? on Wed, 25 Feb 2015 13:07:49 GMT]]></title><description><![CDATA[<p>C.plusplus schrieb:</p>
<blockquote>
<p>wann verwendet man ihn</p>
</blockquote>
<p>Je nach Religionszugehörigkeit immer oder nie.</p>
<p>siehe auch <a href="https://isocpp.org/wiki/faq/cpp11-language#uniform-init" rel="nofollow">https://isocpp.org/wiki/faq/cpp11-language#uniform-init</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2444318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2444318</guid><dc:creator><![CDATA[manni66]]></dc:creator><pubDate>Wed, 25 Feb 2015 13:07:49 GMT</pubDate></item></channel></rss>