<?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[daten aus datei auslesen]]></title><description><![CDATA[<p>hallo,</p>
<p>kann mir bitte einer helfen wie ich mit c++ ein routine entwickle die dies tut:</p>
<p>datei sieht so aus:<br />
0 1<br />
2 3<br />
4 5<br />
6 7</p>
<p>ich will die 1. spallte auslesen und in x[adressen] jeweils speichern.<br />
ich will die 2. spallte auslesen und in y[adressen] jeweils speichern.</p>
<p>bitte um einen code.</p>
<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/235167/daten-aus-datei-auslesen</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 06:36:39 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/235167.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 26 Feb 2009 13:45:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to daten aus datei auslesen on Thu, 26 Feb 2009 13:45:50 GMT]]></title><description><![CDATA[<p>hallo,</p>
<p>kann mir bitte einer helfen wie ich mit c++ ein routine entwickle die dies tut:</p>
<p>datei sieht so aus:<br />
0 1<br />
2 3<br />
4 5<br />
6 7</p>
<p>ich will die 1. spallte auslesen und in x[adressen] jeweils speichern.<br />
ich will die 2. spallte auslesen und in y[adressen] jeweils speichern.</p>
<p>bitte um einen code.</p>
<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1670658</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1670658</guid><dc:creator><![CDATA[rasidrasid]]></dc:creator><pubDate>Thu, 26 Feb 2009 13:45:50 GMT</pubDate></item><item><title><![CDATA[Reply to daten aus datei auslesen on Thu, 26 Feb 2009 14:37:37 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;

int main()
{
    using namespace std;
    const int N = 100;
    int x[N], y[N]; // oder: double x[N], y[N];
    int n = 0;
    {
        ifstream datei(&quot;datei.txt&quot;);
        for( ; n &lt; N &amp;&amp; datei &gt;&gt; x[n] &gt;&gt; y[n]; ++n )
            ;
    }
    cout &lt;&lt; n &lt;&lt; &quot; Positionen gelesen &quot; &lt;&lt; endl;
    return 0;
}
</code></pre>
<p>Tipps:<br />
- nimm statt x und y lieber eine Struktur Position oder Vektor oder etwas vergleichbares.<br />
- nimm statt den Arrays lieber std::vector&lt;&gt;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1670690</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1670690</guid><dc:creator><![CDATA[Werner_logoff]]></dc:creator><pubDate>Thu, 26 Feb 2009 14:37:37 GMT</pubDate></item><item><title><![CDATA[Reply to daten aus datei auslesen on Thu, 26 Feb 2009 14:41:55 GMT]]></title><description><![CDATA[<p>danke, probiere ich aus.</p>
<p>was wird genau in der Zeile:<br />
for( ; n &lt; N &amp;&amp; datei &gt;&gt; x[n] &gt;&gt; y[n]; ++n )<br />
;<br />
gemacht und für was steht zb ( ; n &lt; N &amp;&amp; datei &gt;&gt;<br />
?<br />
danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1670693</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1670693</guid><dc:creator><![CDATA[rasidrasid]]></dc:creator><pubDate>Thu, 26 Feb 2009 14:41:55 GMT</pubDate></item><item><title><![CDATA[Reply to daten aus datei auslesen on Thu, 26 Feb 2009 14:45:40 GMT]]></title><description><![CDATA[<p>Wie wäre es mit <a href="http://www.cpp-entwicklung.de/cpplinux/cpp_main/node5.html#SECTION00520000000000000000" rel="nofollow">http://www.cpp-entwicklung.de/cpplinux/cpp_main/node5.html#SECTION00520000000000000000</a> ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1670700</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1670700</guid><dc:creator><![CDATA[jencas]]></dc:creator><pubDate>Thu, 26 Feb 2009 14:45:40 GMT</pubDate></item><item><title><![CDATA[Reply to daten aus datei auslesen on Thu, 26 Feb 2009 14:48:40 GMT]]></title><description><![CDATA[<p>vielleicht habe ich mich falsch ausgedrückt, sorry.</p>
<p>also zum schluss muss in x[0]=0<br />
x[1]=2<br />
x[2]=4<br />
x[5]=6<br />
y[0]=1<br />
y[1]=3<br />
y[2]=5<br />
y[3]=7</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1670702</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1670702</guid><dc:creator><![CDATA[rasidrasid]]></dc:creator><pubDate>Thu, 26 Feb 2009 14:48:40 GMT</pubDate></item></channel></rss>