<?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[C++ Text einfügen]]></title><description><![CDATA[<p>Ich möchte ein C++ Programm schreiben, was in einer .txt File an einer Bestimmten stelle ein Wort einfügt, ohne dass ein anderes Wort verloren geht. Hat jemand eine Idee, wie man so ein Programm schreiben könnte. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/232338/c-text-einfügen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 09:26:42 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/232338.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Jan 2009 18:32:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to C++ Text einfügen on Wed, 21 Jan 2009 18:32:58 GMT]]></title><description><![CDATA[<p>Ich möchte ein C++ Programm schreiben, was in einer .txt File an einer Bestimmten stelle ein Wort einfügt, ohne dass ein anderes Wort verloren geht. Hat jemand eine Idee, wie man so ein Programm schreiben könnte. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1649754</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1649754</guid><dc:creator><![CDATA[19freddy92]]></dc:creator><pubDate>Wed, 21 Jan 2009 18:32:58 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Text einfügen on Wed, 21 Jan 2009 18:48:14 GMT]]></title><description><![CDATA[<p>Alles einlesen, schreiben und wieder zurückschreiben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1649767</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1649767</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Wed, 21 Jan 2009 18:48:14 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Text einfügen on Wed, 21 Jan 2009 18:52:35 GMT]]></title><description><![CDATA[<p>Als Zusatz, eventuell mal hier gucken:</p>
<p>Lesen:<br />
<a href="http://www.cplusplus.com/reference/iostream/ifstream/" rel="nofollow">http://www.cplusplus.com/reference/iostream/ifstream/</a><br />
Schreiben:<br />
<a href="http://www.cplusplus.com/reference/iostream/ofstream/" rel="nofollow">http://www.cplusplus.com/reference/iostream/ofstream/</a><br />
Container für deinen Dateiinhalt eventuell <code>std::vector&lt;std::string&gt;</code></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1649769</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1649769</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Wed, 21 Jan 2009 18:52:35 GMT</pubDate></item><item><title><![CDATA[Reply to C++ Text einfügen on Wed, 21 Jan 2009 18:59:37 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;vector&gt;
#include &lt;string&gt;

using namespace std;

int main()
{
    fstream f;
    f.open(&quot;deine_datei.txt&quot;, ios::in|ios::out);

    if ( !f )
        return 1;

    string str;
    vector&lt;string&gt; lines;

    while ( !f.eof() )
    {
        getline(f, str);
        lines.push_back(str);
    }

    str = &quot;Dein Wort&quot;;
    lines[__WELCHE_ZEILE__].insert(__WO_DU_DAS_HABEN_WILLST__, str);

    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1649774</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1649774</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Wed, 21 Jan 2009 18:59:37 GMT</pubDate></item></channel></rss>