<?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[Integer Array in eine Variable fassen]]></title><description><![CDATA[<p>Hi, ich wollte gerne wissen wie ich ein gefülltes Array in eine Variable packen kann.<br />
Ich habe da an sowas wie String.append gedacht, sprich an eine Variable den Inhalt eines Arrays durch eine Schleife packen aber mit einem Integer weiss ich nicht wie das klappen soll.<br />
Ich möchte mit einer GUI Anwendung einen eingegebenen Text in die dazugehörige ASCII Nummer umwandeln (char für char).</p>
<p>Code Snippet:</p>
<pre><code class="language-cpp">case IDC_BTN1:
                int number[260];
                char name[260]
                GetDlgItemText( hwndDlg , IDC_EDT1 , name , MAX_PATH );

                for ( int i = 0; i &lt; 50; i++ )
                {
                    number[i] = name[i];
                };

                    ...

                SetDlgItemInt ( hwndDlg , IDC_EDT2 , Alle Nummern , true );
</code></pre>
<p>Mit SetDlgItemInt kann ich ja immer nur ein Element ausgeben oder wenn ich es durch eine Schleife laufen lasse wird immer das letzte gelöscht <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=":/"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/234911/integer-array-in-eine-variable-fassen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 08:11:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/234911.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Feb 2009 14:47:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Integer Array in eine Variable fassen on Mon, 23 Feb 2009 14:47:15 GMT]]></title><description><![CDATA[<p>Hi, ich wollte gerne wissen wie ich ein gefülltes Array in eine Variable packen kann.<br />
Ich habe da an sowas wie String.append gedacht, sprich an eine Variable den Inhalt eines Arrays durch eine Schleife packen aber mit einem Integer weiss ich nicht wie das klappen soll.<br />
Ich möchte mit einer GUI Anwendung einen eingegebenen Text in die dazugehörige ASCII Nummer umwandeln (char für char).</p>
<p>Code Snippet:</p>
<pre><code class="language-cpp">case IDC_BTN1:
                int number[260];
                char name[260]
                GetDlgItemText( hwndDlg , IDC_EDT1 , name , MAX_PATH );

                for ( int i = 0; i &lt; 50; i++ )
                {
                    number[i] = name[i];
                };

                    ...

                SetDlgItemInt ( hwndDlg , IDC_EDT2 , Alle Nummern , true );
</code></pre>
<p>Mit SetDlgItemInt kann ich ja immer nur ein Element ausgeben oder wenn ich es durch eine Schleife laufen lasse wird immer das letzte gelöscht <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=":/"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668782</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668782</guid><dc:creator><![CDATA[bakoora]]></dc:creator><pubDate>Mon, 23 Feb 2009 14:47:15 GMT</pubDate></item><item><title><![CDATA[Reply to Integer Array in eine Variable fassen on Mon, 23 Feb 2009 15:03:01 GMT]]></title><description><![CDATA[<p>Suchst du sowas?</p>
<pre><code class="language-cpp">#include &lt;string&gt;
#include &lt;sstream&gt;
#include &lt;iostream&gt;
#include &lt;iterator&gt;
#include &lt;algorithm&gt;

int main()
{
  std::string line;
  std::getline(std::cin, line);

  std::ostringstream oss;
  std::copy(line.begin(), line.end(), std::ostream_iterator&lt;int&gt;(oss, &quot; &quot;));

  line = oss.str();

  // Mach nun etwas mit dem String ... z.b:
  std::cout &lt;&lt; line &lt;&lt; std::endl;

  return 0;
};
</code></pre>
<p><a href="http://www.cplusplus.com/reference/string/" rel="nofollow">http://www.cplusplus.com/reference/string/</a><br />
<a href="http://www.cplusplus.com/reference/iostream/ostringstream/" rel="nofollow">http://www.cplusplus.com/reference/iostream/ostringstream/</a><br />
<a href="http://www.cplusplus.com/reference/std/iterator/ostream_iterator.html" rel="nofollow">http://www.cplusplus.com/reference/std/iterator/ostream_iterator.html</a><br />
<a href="http://www.cplusplus.com/reference/algorithm/copy.html" rel="nofollow">http://www.cplusplus.com/reference/algorithm/copy.html</a></p>
<p>Zur Konvertierung von Zahlen zu String gibt es in diesem Forum auch noch einen FAQ Eintrag.</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668795</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668795</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Mon, 23 Feb 2009 15:03:01 GMT</pubDate></item></channel></rss>