<?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-Indexe angeben]]></title><description><![CDATA[<p>Ist es in c++ eigentlich möglich nur bestimmte Indexe eines Arrays anzugeben (aussert das ganze mit einer for-schleife zu durchlaufen)?</p>
<p>Ich habe gerade ein bisschen ADA Code vor mir, und dort wird das so angegeben:</p>
<pre><code>myArray(45..103)
</code></pre>
<p>Sprich ich würde in c++ nun gerne die Indexe 44-102 weitergeben.<br />
Wie mach ich das?</p>
<p>grz</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/273250/array-indexe-angeben</link><generator>RSS for Node</generator><lastBuildDate>Fri, 28 Aug 2026 09:21:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/273250.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Sep 2010 06:40:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Array-Indexe angeben on Fri, 03 Sep 2010 06:40:22 GMT]]></title><description><![CDATA[<p>Ist es in c++ eigentlich möglich nur bestimmte Indexe eines Arrays anzugeben (aussert das ganze mit einer for-schleife zu durchlaufen)?</p>
<p>Ich habe gerade ein bisschen ADA Code vor mir, und dort wird das so angegeben:</p>
<pre><code>myArray(45..103)
</code></pre>
<p>Sprich ich würde in c++ nun gerne die Indexe 44-102 weitergeben.<br />
Wie mach ich das?</p>
<p>grz</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1947662</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947662</guid><dc:creator><![CDATA[__)]]></dc:creator><pubDate>Fri, 03 Sep 2010 06:40:22 GMT</pubDate></item><item><title><![CDATA[Reply to Array-Indexe angeben on Fri, 03 Sep 2010 07:07:57 GMT]]></title><description><![CDATA[<p>Siehe <a href="http://codepad.org/XfsxGbf1" rel="nofollow">hier</a>:</p>
<pre><code class="language-cpp">#include &lt;vector&gt;
#include &lt;iostream&gt;
using namespace std;

template&lt;class Iter&gt;
void show(Iter begin, Iter end)
{
  while (begin!=end) {
    cout &lt;&lt; ' ' &lt;&lt; *begin;
    ++begin;
  }
  cout &lt;&lt; '\n';
}

int main()
{
  vector&lt;int&gt; v;
  for (int k=1; k&lt;=5; ++k) v.push_back(11*k);
  show(v.begin()  ,v.end()  );
  show(v.begin()+1,v.end()-1);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1947667</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947667</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Fri, 03 Sep 2010 07:07:57 GMT</pubDate></item><item><title><![CDATA[Reply to Array-Indexe angeben on Fri, 03 Sep 2010 07:16:07 GMT]]></title><description><![CDATA[<p>Und geht das ganze auch komplett ohne Schleife?<br />
Ich möchte die elemente von Index X bis Z einer Funktion übergeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1947670</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947670</guid><dc:creator><![CDATA[__)]]></dc:creator><pubDate>Fri, 03 Sep 2010 07:16:07 GMT</pubDate></item><item><title><![CDATA[Reply to Array-Indexe angeben on Fri, 03 Sep 2010 07:40:04 GMT]]></title><description><![CDATA[<p>__) schrieb:</p>
<blockquote>
<p>Und geht das ganze auch komplett ohne Schleife?<br />
Ich möchte die elemente von Index X bis Z einer Funktion übergeben.</p>
</blockquote>
<p>Das Ausgeben geht nicht ohne Schleife. In Ada übrigens auch nicht. Die Übergabe des Ranges schon, und zwar so, wie krümelkacker es zeigt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1947673</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947673</guid><dc:creator><![CDATA[Tachyon]]></dc:creator><pubDate>Fri, 03 Sep 2010 07:40:04 GMT</pubDate></item><item><title><![CDATA[Reply to Array-Indexe angeben on Fri, 03 Sep 2010 09:14:37 GMT]]></title><description><![CDATA[<p>Alternativ kann man sich auch<br />
<a href="http://www.boost.org/doc/libs/1_44_0/libs/multi_array/doc/user.html" rel="nofollow">http://www.boost.org/doc/libs/1_44_0/libs/multi_array/doc/user.html</a><br />
angucken (siehe &quot;Creating Views&quot;).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1947722</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1947722</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Fri, 03 Sep 2010 09:14:37 GMT</pubDate></item></channel></rss>