<?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[text einlesen und wort in ne char variable schreiben]]></title><description><![CDATA[<p>Hi,<br />
ich bräucht kurz ne Hilfe für ein etwas größeres Prog. Ich möcht das mein Prog aus ner Datei z.B &quot;C:\\test.txt&quot; mit ifstream oder sowas einliest und beim Vorkommen des Wort &quot;Beispiel&quot; das nächste Wort in ne char Variable schreibt.<br />
Steh grad ein bissl auf Schlauch, kann mir jemand helfen.</p>
<p>Danke<br />
Steffen</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/223985/text-einlesen-und-wort-in-ne-char-variable-schreiben</link><generator>RSS for Node</generator><lastBuildDate>Sat, 03 Oct 2026 12:18:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/223985.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Oct 2008 18:21:08 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to text einlesen und wort in ne char variable schreiben on Fri, 03 Oct 2008 18:21:08 GMT]]></title><description><![CDATA[<p>Hi,<br />
ich bräucht kurz ne Hilfe für ein etwas größeres Prog. Ich möcht das mein Prog aus ner Datei z.B &quot;C:\\test.txt&quot; mit ifstream oder sowas einliest und beim Vorkommen des Wort &quot;Beispiel&quot; das nächste Wort in ne char Variable schreibt.<br />
Steh grad ein bissl auf Schlauch, kann mir jemand helfen.</p>
<p>Danke<br />
Steffen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1593097</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1593097</guid><dc:creator><![CDATA[steffenxyz]]></dc:creator><pubDate>Fri, 03 Oct 2008 18:21:08 GMT</pubDate></item><item><title><![CDATA[Reply to text einlesen und wort in ne char variable schreiben on Fri, 03 Oct 2008 18:44:26 GMT]]></title><description><![CDATA[<p>Hast schon einen Ansatz?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1593114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1593114</guid><dc:creator><![CDATA[***gutrien***]]></dc:creator><pubDate>Fri, 03 Oct 2008 18:44:26 GMT</pubDate></item><item><title><![CDATA[Reply to text einlesen und wort in ne char variable schreiben on Fri, 03 Oct 2008 19:05:39 GMT]]></title><description><![CDATA[<p>ja hier,</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;
using namespace std;
char get_name(){
     char ch;
     char name[127];
     ifstream f1(&quot;C:\\test.txt&quot;);
     //Text mit mehreren Wörtern
     while( ch = f1.get()){
            if( ch = EOF ){
                cout&lt;&lt; &quot;Ende der Datei oder Fehler&quot;&lt;&lt;endl;
                break;
            }
     }
     /*Und hier soll das Programm nach dem Wort &quot;beispiel&quot; suchen und das nächste Wort in die Variable &quot;name&quot; schreiben--&gt; Leider kp wie das gehn soll*/

     return name;
}

int main(void){
    char test = get_name();
    cout &lt;&lt;test;    
    system(&quot;PAUSE&quot;);
    return 0;
}
</code></pre>
<p>Keine Ahnung auch ob der Teil mit ifstream richtig ist. Hab versucht es durch überfliegen des kapitels mit fstream rauszufinden aber war dann doch zu schwer<br />
Nur ein Teil des ganzen Progs aber so sollte der Teil aussehen<br />
Leider fehlen da noch einige Sachen, bin noch ned so weit in C++. Aber bräuchte das für das Prog.</p>
<p>Hoffe jemand kann mir helfen</p>
<p>Danke<br />
Steffen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1593118</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1593118</guid><dc:creator><![CDATA[steffenxyz]]></dc:creator><pubDate>Fri, 03 Oct 2008 19:05:39 GMT</pubDate></item></channel></rss>