<?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[uint16_t Werte hinzufügen]]></title><description><![CDATA[<p>Hallo,<br />
ich habe in einer Variable (uint16_t one) den Wert 465 und möchte jetzt vor die 465 das Wort Hello setzten. Ist so was möglich und wenn wie ja?</p>
<p>LG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/325690/uint16_t-werte-hinzufügen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 21:52:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/325690.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 May 2014 19:10:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Tue, 13 May 2014 19:10:38 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich habe in einer Variable (uint16_t one) den Wert 465 und möchte jetzt vor die 465 das Wort Hello setzten. Ist so was möglich und wenn wie ja?</p>
<p>LG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399038</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399038</guid><dc:creator><![CDATA[LightBoom]]></dc:creator><pubDate>Tue, 13 May 2014 19:10:38 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Tue, 13 May 2014 19:14:13 GMT]]></title><description><![CDATA[<pre><code>&quot;Hello&quot;;
uint16_t one = 465;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2399039</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399039</guid><dc:creator><![CDATA[nwp3]]></dc:creator><pubDate>Tue, 13 May 2014 19:14:13 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Tue, 13 May 2014 19:16:07 GMT]]></title><description><![CDATA[<p>Wie soll da das Hello reinkommen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399040</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399040</guid><dc:creator><![CDATA[FrageMaster]]></dc:creator><pubDate>Tue, 13 May 2014 19:16:07 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Tue, 13 May 2014 19:44:24 GMT]]></title><description><![CDATA[<p>nwp3 schrieb:</p>
<blockquote>
<pre><code>&quot;Hello&quot;;
uint16_t one = 465;
</code></pre>
</blockquote>
<p>Nein, nein: er will das &quot;Hello&quot; vor die 465:</p>
<pre><code>uint16_t one = &quot;Hello&quot;, 465;
</code></pre>
<p>Spaß beiseite:</p>
<pre><code>auto hello465 = &quot;Hello&quot; + std::to_string(465);
// in hello465 steht die Zeichenfolge &quot;Hello465&quot;
</code></pre>
<p>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399045</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399045</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Tue, 13 May 2014 19:44:24 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Tue, 13 May 2014 19:56:46 GMT]]></title><description><![CDATA[<p>Nathan schrieb:</p>
<blockquote>
<p>Spaß beiseite:</p>
<pre><code>auto hello465 = &quot;Hello&quot; + std::to_string(465);
// in hello465 steht die Zeichenfolge &quot;Hello465&quot;
</code></pre>
<p>?</p>
</blockquote>
<p>Ich wette, der Threadersteller möchte einfach nur beides hintereinander ausgeben. Aber das darf ihm jemand anderes aus der Nase ziehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399051</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399051</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 13 May 2014 19:56:46 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Tue, 13 May 2014 20:31:06 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Ich wette, der Threadersteller möchte einfach nur beides hintereinander ausgeben.</p>
</blockquote>
<pre><code>#include &lt;iostream&gt;
// #include &lt;string&gt;

using namespace std; // frag erstmal nicht danach

int main()
{
    cout &lt;&lt; &quot;Hello &quot; &lt;&lt; 465 &lt;&lt; '\n';
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2399059</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399059</guid><dc:creator><![CDATA[5cript]]></dc:creator><pubDate>Tue, 13 May 2014 20:31:06 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Tue, 13 May 2014 20:42:05 GMT]]></title><description><![CDATA[<p>Da ist das 465 aber ein int, kein uint16_t [/klugscheiß] <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399060</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399060</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 13 May 2014 20:42:05 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Tue, 13 May 2014 21:53:57 GMT]]></title><description><![CDATA[<p>Produziert das hier mehr Übelkeit?</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;string&gt;

void concat(std::ostream&amp; stream)
{ }

template &lt;typename T, typename ... List&gt;
void concat(std::ostream&amp; stream, T var, List... args)
{
    stream &lt;&lt; var;
    concat(stream, args...);
}

int main()
{
    std::stringstream sstr;

    concat(std::cout, &quot;Hello &quot;, static_cast &lt;uint16_t&gt; (465), '\n');
    concat(sstr, &quot;Hello &quot;, static_cast &lt;uint16_t&gt; (465), '\n');

    auto string = sstr.str();
    // std::cout &lt;&lt; sstr.rdbuf();
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2399075</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399075</guid><dc:creator><![CDATA[5cript]]></dc:creator><pubDate>Tue, 13 May 2014 21:53:57 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Tue, 13 May 2014 22:28:46 GMT]]></title><description><![CDATA[<p>Tim06TR schrieb:</p>
<blockquote>
<p>Produziert das hier mehr Übelkeit?</p>
</blockquote>
<p>Wird zumindest der Frage gerecht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399078</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399078</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 13 May 2014 22:28:46 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Wed, 14 May 2014 12:44:24 GMT]]></title><description><![CDATA[<p>Wollte das ohne strings machen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399153</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399153</guid><dc:creator><![CDATA[LightBoom]]></dc:creator><pubDate>Wed, 14 May 2014 12:44:24 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Wed, 14 May 2014 12:46:14 GMT]]></title><description><![CDATA[<p>Gut zu wissen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399154</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399154</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Wed, 14 May 2014 12:46:14 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Wed, 14 May 2014 12:47:15 GMT]]></title><description><![CDATA[<p>LightBoom schrieb:</p>
<blockquote>
<p>Wollte das ohne strings machen</p>
</blockquote>
<p>Was ist denn das Wort Hello, wenn kein String?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399156</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399156</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Wed, 14 May 2014 12:47:15 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Wed, 14 May 2014 17:46:36 GMT]]></title><description><![CDATA[<p>MFK schrieb:</p>
<blockquote>
<p>LightBoom schrieb:</p>
<blockquote>
<p>Wollte das ohne strings machen</p>
</blockquote>
<p>Was ist denn das Wort Hello, wenn kein String?</p>
</blockquote>
<p>&quot;Hallo&quot; ist ein <code>const char[6]</code> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>@Threadersteller: Wie du bemerkst, bekommst du nur dumme Antworten. Das liegt da dran, dass - das muss man einfach so sagen - deine Frage ziemlich dumm ist. Wie man kluge Fragen stellt:<br />
<a href="http://www.tty1.net/smart-questions_de.html" rel="nofollow">http://www.tty1.net/smart-questions_de.html</a><br />
Oder, etwas spezieller auf dieses Forum:<br />
<a href="http://www.c-plusplus.net/forum/200753" rel="nofollow">http://www.c-plusplus.net/forum/200753</a><br />
und<br />
<a href="http://www.c-plusplus.net/forum/136013" rel="nofollow">http://www.c-plusplus.net/forum/136013</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399188</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399188</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 14 May 2014 17:46:36 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Wed, 14 May 2014 18:55:29 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>&quot;Hallo&quot; ist ein <code>const char[6]</code> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
</blockquote>
<p>Mir ist peinlich, dass ich das jetzt ausprobiert habe, und ich traue mich gar nicht zu fragen, aber:<br />
EDIT: Eigentlich war mir nur gerade mal danach cxa_demangle auszuprobieren... -.-</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;cxxabi.h&gt;
#include &lt;typeinfo&gt;
// #include &lt;stdexcept&gt;

template &lt;typename T&gt;
struct type
{
    // schnell runtergetippt
    static std::string name()
    {
        int status = 0;
        auto* cptr = abi::__cxa_demangle(typeid (T).name(), nullptr, nullptr, &amp;status);
        std::string str (cptr);
        if (status) free(cptr);
        return str;
    }
};

int main()
{
    std::cout &lt;&lt; typeid(&quot;Hello&quot;).name() &lt;&lt; &quot;\n&quot;;
    std::cout &lt;&lt; type&lt;decltype(&quot;Hello&quot;)&gt;::name() &lt;&lt; &quot;\n&quot;;
    return 0;
}
</code></pre>
<p>ergibt</p>
<pre><code>char [6]
</code></pre>
<p>(A6_c)<br />
Was habe ich jetzt <s>falsch</s> kaputt gemacht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399200</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399200</guid><dc:creator><![CDATA[5cript]]></dc:creator><pubDate>Wed, 14 May 2014 18:55:29 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Wed, 14 May 2014 19:16:28 GMT]]></title><description><![CDATA[<p>Tim06TR schrieb:</p>
<blockquote>
<p>Was habe ich jetzt <s>falsch</s> kaputt gemacht?</p>
</blockquote>
<p>Das genau zu beantworten, dafür müsste ich mich in __cxa_demangle einarbeiten. Aber du hast hoffentlich gemerkt, dass dein Code bei einem <code>const int[6]</code> ebenfalls &quot;int[6]&quot; angibt, es also nicht an dem <code>&quot;Hello&quot;</code> liegt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399203</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399203</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 14 May 2014 19:16:28 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Wed, 14 May 2014 19:51:10 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Tim06TR schrieb:</p>
<blockquote>
<p>Was habe ich jetzt <s>falsch</s> kaputt gemacht?</p>
</blockquote>
<p>Aber du hast hoffentlich gemerkt, dass dein Code bei einem <code>const int[6]</code> ebenfalls &quot;int[6]&quot; angibt, es also nicht an dem <code>&quot;Hello&quot;</code> liegt?</p>
</blockquote>
<p>oh... -.-</p>
<p>aber typeid gibt schon das falsche (?) Ergebnis. Es sei denn cv-qualifiers werden gar nicht erst berücksichtigt.<br />
i für const int</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399206</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399206</guid><dc:creator><![CDATA[5cript]]></dc:creator><pubDate>Wed, 14 May 2014 19:51:10 GMT</pubDate></item><item><title><![CDATA[Reply to uint16_t Werte hinzufügen on Wed, 14 May 2014 20:22:39 GMT]]></title><description><![CDATA[<p>Tim06TR schrieb:</p>
<blockquote>
<p>aber typeid gibt schon das falsche (?) Ergebnis. Es sei denn cv-qualifiers werden gar nicht erst berücksichtigt.<br />
i für const int</p>
</blockquote>
<p>Das ist auch so bei typeid, nach Standard.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2399213</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2399213</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 14 May 2014 20:22:39 GMT</pubDate></item></channel></rss>