<?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[char in integer wandeln]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>ich habe ein Problem. Ich möchte einen char Wert in Integer wandeln:<br />
char port[255];<br />
int iport;</p>
<p>printf(&quot;Port:&quot;);<br />
scanf (port);<br />
iport = int(port);</p>
<p>Wie kann ich das anstellen. Normal Typecasten geht wohl nicht.</p>
<p>Danke in voraus für Eure Hilfe.</p>
<p>Grüsse<br />
xthing</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/154820/char-in-integer-wandeln</link><generator>RSS for Node</generator><lastBuildDate>Tue, 08 Sep 2026 02:28:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/154820.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 31 Jul 2006 08:27:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to char in integer wandeln on Mon, 31 Jul 2006 08:27:05 GMT]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>ich habe ein Problem. Ich möchte einen char Wert in Integer wandeln:<br />
char port[255];<br />
int iport;</p>
<p>printf(&quot;Port:&quot;);<br />
scanf (port);<br />
iport = int(port);</p>
<p>Wie kann ich das anstellen. Normal Typecasten geht wohl nicht.</p>
<p>Danke in voraus für Eure Hilfe.</p>
<p>Grüsse<br />
xthing</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107531</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107531</guid><dc:creator><![CDATA[xthing]]></dc:creator><pubDate>Mon, 31 Jul 2006 08:27:05 GMT</pubDate></item><item><title><![CDATA[Reply to char in integer wandeln on Mon, 31 Jul 2006 08:29:46 GMT]]></title><description><![CDATA[<p><a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39488.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-39488.html</a><br />
Du hast Glück, ich bin gut gelaunt, deshalb werde ich dich jetzt nicht als blind oder faul beschimpfen ;).<br />
Beim nächsten bitte zuerst die FAQs durchsuchen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107536</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107536</guid><dc:creator><![CDATA[.filmor]]></dc:creator><pubDate>Mon, 31 Jul 2006 08:29:46 GMT</pubDate></item><item><title><![CDATA[Reply to char in integer wandeln on Mon, 31 Jul 2006 08:31:07 GMT]]></title><description><![CDATA[<p>xthing schrieb:</p>
<blockquote>
<p>Hi Leute,</p>
<p>ich habe ein Problem. Ich möchte einen char Wert in Integer wandeln:<br />
char port[255];<br />
int iport;</p>
<p>printf(&quot;Port:&quot;);<br />
scanf (port);<br />
iport = int(port);</p>
<p>Wie kann ich das anstellen. Normal Typecasten geht wohl nicht.</p>
<p>Danke in voraus für Eure Hilfe.</p>
<p>Grüsse<br />
xthing</p>
</blockquote>
<p>Wenn du es in C++ machst wäre das hier der richtige Weg:</p>
<pre><code class="language-cpp">int iport = 0;

std::cout &lt;&lt; &quot;Port:&quot; &lt;&lt; std::flush;
std::cin &gt;&gt; iport;
</code></pre>
<p>Wenn du es mit den C I/O Funktionen machen willst wäre das afaik der Weg deiner Wahl: (ungetestet)</p>
<pre><code class="language-cpp">int iport = 0;
printf(&quot;Port: &quot;);
fscanf(stdin,&quot;%i&quot;,&amp;iport);
</code></pre>
<p>BR<br />
Vinzenz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107539</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107539</guid><dc:creator><![CDATA[evilissimo]]></dc:creator><pubDate>Mon, 31 Jul 2006 08:31:07 GMT</pubDate></item><item><title><![CDATA[Reply to char in integer wandeln on Mon, 31 Jul 2006 17:59:21 GMT]]></title><description><![CDATA[<p>und um nen char-array in nen integrer zu verwandeln nutze man: atoi !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1107946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1107946</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Mon, 31 Jul 2006 17:59:21 GMT</pubDate></item><item><title><![CDATA[Reply to char in integer wandeln on Tue, 01 Aug 2006 17:13:52 GMT]]></title><description><![CDATA[<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="😕"
    /> Er will doch keinen char-Array sondern nur ein char in int umwandeln.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1108736</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1108736</guid><dc:creator><![CDATA[Javaner]]></dc:creator><pubDate>Tue, 01 Aug 2006 17:13:52 GMT</pubDate></item></channel></rss>