<?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[array of struct als typedef?]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte ein Array aus structs als Typ definieren:</p>
<pre><code class="language-cpp">struct myStruct{
  int a;
  int b;
  }

typedef myStruct[60] myStructArray;
</code></pre>
<p>dann:</p>
<pre><code class="language-cpp">queue &lt;myStructArray&gt; myStructArrayQueue;
</code></pre>
<p>Ich habe da scheinbar einen Gedankenfehler, da es so nicht klappt.<br />
Wo liegt mein Problem?</p>
<p>Wäre für eine Antowrt dankbar.</p>
<p>Gruß<br />
Structer</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/277508/array-of-struct-als-typedef</link><generator>RSS for Node</generator><lastBuildDate>Tue, 25 Aug 2026 21:00:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/277508.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Nov 2010 16:19:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to array of struct als typedef? on Fri, 19 Nov 2010 16:19:52 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte ein Array aus structs als Typ definieren:</p>
<pre><code class="language-cpp">struct myStruct{
  int a;
  int b;
  }

typedef myStruct[60] myStructArray;
</code></pre>
<p>dann:</p>
<pre><code class="language-cpp">queue &lt;myStructArray&gt; myStructArrayQueue;
</code></pre>
<p>Ich habe da scheinbar einen Gedankenfehler, da es so nicht klappt.<br />
Wo liegt mein Problem?</p>
<p>Wäre für eine Antowrt dankbar.</p>
<p>Gruß<br />
Structer</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1982948</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1982948</guid><dc:creator><![CDATA[Structer]]></dc:creator><pubDate>Fri, 19 Nov 2010 16:19:52 GMT</pubDate></item><item><title><![CDATA[Reply to array of struct als typedef? on Fri, 19 Nov 2010 16:22:04 GMT]]></title><description><![CDATA[<p>Was ist denn die Fehlermeldung?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1982951</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1982951</guid><dc:creator><![CDATA[theta]]></dc:creator><pubDate>Fri, 19 Nov 2010 16:22:04 GMT</pubDate></item><item><title><![CDATA[Reply to array of struct als typedef? on Fri, 19 Nov 2010 16:23:54 GMT]]></title><description><![CDATA[<p>Typdefinitionen mit <code>typedef</code> sind sehr ähnlich zu Variablendefinitionen.</p>
<pre><code class="language-cpp">typedef myStruct myStructArray[60];
</code></pre>
<p>Aber normale Arrays sind etwas problematisch, was Wertsemantik angeht. Wahrscheinlich hilft dir der Wrapper <code>std::tr1::array</code> (bzw. <code>boost::array</code> ), oder du speicherst das Array wiederum in einer Struktur.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1982952</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1982952</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Fri, 19 Nov 2010 16:23:54 GMT</pubDate></item><item><title><![CDATA[Reply to array of struct als typedef? on Fri, 19 Nov 2010 16:24:52 GMT]]></title><description><![CDATA[<p>Sorry, hab ich ganz vergessen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":-("
      alt="😞"
    /><br />
error: expected unqualified-id before '[' token</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1982955</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1982955</guid><dc:creator><![CDATA[Structer]]></dc:creator><pubDate>Fri, 19 Nov 2010 16:24:52 GMT</pubDate></item><item><title><![CDATA[Reply to array of struct als typedef? on Fri, 19 Nov 2010 16:28:20 GMT]]></title><description><![CDATA[<p>Nexus schrieb:</p>
<blockquote>
<p>Typdefinitionen mit <code>typedef</code> sind sehr ähnlich zu Variablendefinitionen.</p>
<pre><code class="language-cpp">typedef myStruct myStructArray[60];
</code></pre>
<p>Aber normale Arrays sind etwas problematisch, was Wertsemantik angeht. Wahrscheinlich hilft dir der Wrapper <code>std::tr1::array</code> (bzw. <code>boost::array</code> ), oder du speicherst das Array wiederum in einer Struktur.</p>
</blockquote>
<p>typedef myStruct myStructArray[60]; geht gar nicht?!<br />
meine typedefs hab ich alle mit<br />
typedef name neuertyp; definiert.</p>
<p>es muss in die queue, das diesese struct-Arrays eigene Datenblöcke sind und via queue abgearbeitet werden sollen.</p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1982959</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1982959</guid><dc:creator><![CDATA[Structer]]></dc:creator><pubDate>Fri, 19 Nov 2010 16:28:20 GMT</pubDate></item><item><title><![CDATA[Reply to array of struct als typedef? on Fri, 19 Nov 2010 16:29:57 GMT]]></title><description><![CDATA[<p>Structer schrieb:</p>
<blockquote>
<p>Nexus schrieb:</p>
<blockquote>
<p>Typdefinitionen mit <code>typedef</code> sind sehr ähnlich zu Variablendefinitionen.</p>
<pre><code class="language-cpp">typedef myStruct myStructArray[60];
</code></pre>
<p>Aber normale Arrays sind etwas problematisch, was Wertsemantik angeht. Wahrscheinlich hilft dir der Wrapper <code>std::tr1::array</code> (bzw. <code>boost::array</code> ), oder du speicherst das Array wiederum in einer Struktur.</p>
</blockquote>
<p>typedef myStruct myStructArray[60]; geht gar nicht?!<br />
meine typedefs hab ich alle mit<br />
typedef name neuertyp; definiert.</p>
<p>es muss in die queue, das diesese struct-Arrays eigene Datenblöcke sind und via queue abgearbeitet werden sollen.</p>
<p>Gruß</p>
</blockquote>
<p>Kann meinen Text leider nicht korrigieren. Sorry, hatte Deine Antwort falsch verstanden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1982960</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1982960</guid><dc:creator><![CDATA[Structer]]></dc:creator><pubDate>Fri, 19 Nov 2010 16:29:57 GMT</pubDate></item><item><title><![CDATA[Reply to array of struct als typedef? on Fri, 19 Nov 2010 16:42:50 GMT]]></title><description><![CDATA[<p>Zwischen <strong>}</strong> und <strong>typedef</strong> fehlt was...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1982969</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1982969</guid><dc:creator><![CDATA[DocShoe]]></dc:creator><pubDate>Fri, 19 Nov 2010 16:42:50 GMT</pubDate></item><item><title><![CDATA[Reply to array of struct als typedef? on Fri, 19 Nov 2010 18:16:49 GMT]]></title><description><![CDATA[<p>Ja, ich habs nicht kopiert, ist im Originalcode also schon korrekt.<br />
Aber Danke <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1983033</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1983033</guid><dc:creator><![CDATA[Structer]]></dc:creator><pubDate>Fri, 19 Nov 2010 18:16:49 GMT</pubDate></item></channel></rss>