<?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[string nach int mit führenden Nullen]]></title><description><![CDATA[<p>Hi!</p>
<p>Wie schon der Titel sagt, müsste ich einen String in eine Zahl umwandeln.<br />
Das Umwandeln selbst mache ich mit StrToInt() (Borland Builder), aber die führenden Nullen werden dabei gelöscht.<br />
Wie kann ich die führenden Nullen erhalten?</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/160355/string-nach-int-mit-führenden-nullen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 05:13:14 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160355.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Sep 2006 08:28:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to string nach int mit führenden Nullen on Mon, 25 Sep 2006 08:28:15 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Wie schon der Titel sagt, müsste ich einen String in eine Zahl umwandeln.<br />
Das Umwandeln selbst mache ich mit StrToInt() (Borland Builder), aber die führenden Nullen werden dabei gelöscht.<br />
Wie kann ich die führenden Nullen erhalten?</p>
<p>mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1143814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1143814</guid><dc:creator><![CDATA[nightrider]]></dc:creator><pubDate>Mon, 25 Sep 2006 08:28:15 GMT</pubDate></item><item><title><![CDATA[Reply to string nach int mit führenden Nullen on Mon, 25 Sep 2006 08:33:04 GMT]]></title><description><![CDATA[<p>Das geht nicht, alle führenden nullen werden ignoriert. In einer Variablen vom typ int wirst du nie führende Nullen haben. Aber wenn du weißt wie groß das Feld bei der Ausgabe maximal ist, kannst du es mit setfill('0') und setw(zahl) mit Nullen wieder auffüllen:</p>
<pre><code class="language-cpp">int i=4;
cout &lt;&lt; setfill('0') &lt;&lt; setw(3) &lt;&lt; i; // Gibt 004 aus
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1143818</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1143818</guid><dc:creator><![CDATA[Vellas]]></dc:creator><pubDate>Mon, 25 Sep 2006 08:33:04 GMT</pubDate></item><item><title><![CDATA[Reply to string nach int mit führenden Nullen on Mon, 25 Sep 2006 08:44:24 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>wenn du führende Nullen brauchst, ist der Datentyp int dafür nicht der richtige. Bleib lieber beim String.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1143826</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1143826</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 25 Sep 2006 08:44:24 GMT</pubDate></item></channel></rss>