<?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[vector mit struct Datentyp]]></title><description><![CDATA[<p>Wenn ich einen vector&lt;finance&gt; habe, wie sprech ich dann jetzt die 3 Werte money_re, money_amount und money_date an? (Wobei date auch wieder n struct Datentyp is!)<br />
Ich blick da gerade irgendwie nicht mehr so durch, wie sprech ich n das jetzt alles nochmal an? Also für ein Feld im vektor? Irgendwie hab ich n Denkfehler?</p>
<pre><code class="language-cpp">struct datum
{
    unsigned long year;
    unsigned long month;
    unsigned long day;
};

struct finance
{
    std::string money_re; 
    unsigned long money_amount;
    datum money_date;
};
</code></pre>
<p>MfG<br />
Stromberg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/212540/vector-mit-struct-datentyp</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 21:21:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/212540.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 07 May 2008 14:32:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to vector mit struct Datentyp on Wed, 07 May 2008 14:32:52 GMT]]></title><description><![CDATA[<p>Wenn ich einen vector&lt;finance&gt; habe, wie sprech ich dann jetzt die 3 Werte money_re, money_amount und money_date an? (Wobei date auch wieder n struct Datentyp is!)<br />
Ich blick da gerade irgendwie nicht mehr so durch, wie sprech ich n das jetzt alles nochmal an? Also für ein Feld im vektor? Irgendwie hab ich n Denkfehler?</p>
<pre><code class="language-cpp">struct datum
{
    unsigned long year;
    unsigned long month;
    unsigned long day;
};

struct finance
{
    std::string money_re; 
    unsigned long money_amount;
    datum money_date;
};
</code></pre>
<p>MfG<br />
Stromberg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1504938</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1504938</guid><dc:creator><![CDATA[Stromberg]]></dc:creator><pubDate>Wed, 07 May 2008 14:32:52 GMT</pubDate></item><item><title><![CDATA[Reply to vector mit struct Datentyp on Wed, 07 May 2008 14:46:29 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">struct finance
{
    std::string money_re;
    unsigned long money_amount;
    datum money_date;

std::vector&lt;finance&gt; fin_vec(10);

//so z.B. (ohne Boundary-Checks)
fin_vec[0].money_re = &quot;Yen&quot;;

//oder so (mit Boundary-Checks)
fin_vec.at(0).money_re = &quot;Yen&quot;;

//oder so (über Iteratoren)
std::vector&lt;finance&gt;::iterator iter = fin_vec.begin();
iter-&gt;money_re = &quot;Yen&quot;;
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1504955</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1504955</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Wed, 07 May 2008 14:46:29 GMT</pubDate></item></channel></rss>