<?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 array]]></title><description><![CDATA[<p>Hi Leute<br />
Ich versuch eine string array zu machen aber bei mir funktioniert das nicht wie macht man das am besten ich habs so versucht:<br />
std::string liste[] = {&quot;int&quot;, &quot;string&quot;, &quot;wstring&quot;, &quot;bool&quot;, &quot;INT:&quot;, &quot;STRING:&quot;, &quot;WSTRING:&quot;, &quot;BOOL:&quot;};</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/275373/string-array</link><generator>RSS for Node</generator><lastBuildDate>Thu, 27 Aug 2026 03:35:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/275373.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 13 Oct 2010 17:31:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to String array on Wed, 13 Oct 2010 17:32:15 GMT]]></title><description><![CDATA[<p>Hi Leute<br />
Ich versuch eine string array zu machen aber bei mir funktioniert das nicht wie macht man das am besten ich habs so versucht:<br />
std::string liste[] = {&quot;int&quot;, &quot;string&quot;, &quot;wstring&quot;, &quot;bool&quot;, &quot;INT:&quot;, &quot;STRING:&quot;, &quot;WSTRING:&quot;, &quot;BOOL:&quot;};</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1965159</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965159</guid><dc:creator><![CDATA[CCodex]]></dc:creator><pubDate>Wed, 13 Oct 2010 17:32:15 GMT</pubDate></item><item><title><![CDATA[Reply to String array on Wed, 13 Oct 2010 17:38:16 GMT]]></title><description><![CDATA[<p>Bei <code>std::string</code> geht das so nicht. Da musst du die Werte einzeln Eintragen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1965164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965164</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Wed, 13 Oct 2010 17:38:16 GMT</pubDate></item><item><title><![CDATA[Reply to String array on Wed, 13 Oct 2010 17:46:59 GMT]]></title><description><![CDATA[<p>gibt es irgend eine möglichkeit eine liste zu erstellen ich gebs bald auf <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1965168</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965168</guid><dc:creator><![CDATA[CCodex]]></dc:creator><pubDate>Wed, 13 Oct 2010 17:46:59 GMT</pubDate></item><item><title><![CDATA[Reply to String array on Wed, 13 Oct 2010 17:50:17 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">std::list&lt;std::string&gt; strlist;
strlist.push_back(&quot;String1&quot;);
strlist.push_back(&quot;String2&quot;);
// etc.
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1965173</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965173</guid><dc:creator><![CDATA[mh.]]></dc:creator><pubDate>Wed, 13 Oct 2010 17:50:17 GMT</pubDate></item><item><title><![CDATA[Reply to String array on Wed, 13 Oct 2010 18:03:07 GMT]]></title><description><![CDATA[<p>geht nicht da kommt:</p>
<pre><code>/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|9|error: expected constructor, destructor, or type conversion before ‘&lt;’ token|
/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|10|error: expected constructor, destructor, or type conversion before ‘.’ token|
/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|11|error: expected constructor, destructor, or type conversion before ‘.’ token|
/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|12|error: expected constructor, destructor, or type conversion before ‘.’ token|
/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|13|error: expected constructor, destructor, or type conversion before ‘.’ token|
/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|14|error: expected constructor, destructor, or type conversion before ‘.’ token|
/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|15|error: expected constructor, destructor, or type conversion before ‘.’ token|
/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|16|error: expected constructor, destructor, or type conversion before ‘.’ token|
/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|17|error: expected constructor, destructor, or type conversion before ‘.’ token|
||=== Build finished: 9 errors, 0 warnings ===|
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1965179</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965179</guid><dc:creator><![CDATA[CCodex]]></dc:creator><pubDate>Wed, 13 Oct 2010 18:03:07 GMT</pubDate></item><item><title><![CDATA[Reply to String array on Wed, 13 Oct 2010 18:07:44 GMT]]></title><description><![CDATA[<p>gamebuntu schrieb:</p>
<blockquote>
<p>Hi Leute<br />
Ich versuch eine string array zu machen aber bei mir funktioniert das nicht wie macht man das am besten ich habs so versucht:<br />
std::string liste[] = {&quot;int&quot;, &quot;string&quot;, &quot;wstring&quot;, &quot;bool&quot;, &quot;INT:&quot;, &quot;STRING:&quot;, &quot;WSTRING:&quot;, &quot;BOOL:&quot;};</p>
</blockquote>
<p>Komisch. Bei <a href="http://codepad.org/rZzdfj4O" rel="nofollow">mir</a> geht das.</p>
<p>Da aber std::string kein &quot;Literal-Typ&quot; (C++0x-sprech) wird so etwas immer dynamisch initialisiert, auch, wenn Du es außerhalb von Funktionen definierst. Als Zeichenketten-Lookup-Tabelle -- also, wenn die Strings nicht verändert werden müsse -- finde ich so etwas noch sehr praktisch:</p>
<pre><code class="language-cpp">char const* const list[] = {&quot;La&quot;, &quot;Le&quot;, &quot;Lu&quot;};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1965180</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965180</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Wed, 13 Oct 2010 18:07:44 GMT</pubDate></item><item><title><![CDATA[Reply to String array on Wed, 13 Oct 2010 18:06:55 GMT]]></title><description><![CDATA[<p>bEI MIR KOMMT DANN DAS:</p>
<pre><code>obj/Debug/lexer/variable.o||In function `__tcf_0':|
/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|9|multiple definition of `liste'|
obj/Debug/lexer/lexer.o:/media/nico_/sicherung/ubuntu/Projekt/c lite/lexer/variable.h|9|first defined here|
||=== Build finished: 2 errors, 0 warnings ===|
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1965181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965181</guid><dc:creator><![CDATA[CCodex]]></dc:creator><pubDate>Wed, 13 Oct 2010 18:06:55 GMT</pubDate></item><item><title><![CDATA[Reply to String array on Wed, 13 Oct 2010 18:13:18 GMT]]></title><description><![CDATA[<p>gamebuntu schrieb:</p>
<blockquote>
<p>multiple definition of `liste'</p>
</blockquote>
<p>Ja dann halte Dich doch einfach an die <a href="http://en.wikipedia.org/wiki/One_Definition_Rule" rel="nofollow">ODR</a>. Beachte da Punkt 2. Du hast scheinbar die Liste in einem Header definiert und diesen in mehreren &quot;translation units&quot; eingebunden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1965182</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965182</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Wed, 13 Oct 2010 18:13:18 GMT</pubDate></item><item><title><![CDATA[Reply to String array on Wed, 13 Oct 2010 18:10:05 GMT]]></title><description><![CDATA[<p>das komme ist das ich mich daran halte nirgendst wo anderes im Quelltext ist solch eine definition noch;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1965183</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965183</guid><dc:creator><![CDATA[CCodex]]></dc:creator><pubDate>Wed, 13 Oct 2010 18:10:05 GMT</pubDate></item><item><title><![CDATA[Reply to String array on Wed, 13 Oct 2010 18:32:30 GMT]]></title><description><![CDATA[<p>ich habs herrausgefunden ich hab das in der variable.h rein gemacht aber ich darf nur in variable.cpp das so definieren.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/24868">@krümelkacker</a>:<br />
Ich benutze C++0x schon obs einen unterschied macht sehe ich momentan nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1965184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965184</guid><dc:creator><![CDATA[CCodex]]></dc:creator><pubDate>Wed, 13 Oct 2010 18:32:30 GMT</pubDate></item><item><title><![CDATA[Reply to String array on Thu, 14 Oct 2010 11:41:40 GMT]]></title><description><![CDATA[<p>gamebuntu schrieb:</p>
<blockquote>
<p>das komme ist das ich mich daran halte nirgendst wo anderes im Quelltext ist solch eine definition noch;</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /> <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="😕"
    /> <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="😕"
    /><br />
*massive syntax error*<br />
Ich hoffe, dein C++-Code ist besser <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>Gruß,</p>
<p>Simon2.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1965501</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1965501</guid><dc:creator><![CDATA[Simon2]]></dc:creator><pubDate>Thu, 14 Oct 2010 11:41:40 GMT</pubDate></item></channel></rss>