<?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[in file code schreiben]]></title><description><![CDATA[<p>Hallo gibt es eine einfach art quellcode in ein file zu schreiben ?<br />
also in der art</p>
<p>file &lt;&lt; #include &lt;irgendeinheader.h&gt;</p>
<p>class1 {</p>
<p>}</p>
<p>&lt;&lt; EOF</p>
<p>so dass genau wie ichs zwisschen den &quot;&lt;&lt;&quot; hinschreibe auch im file erscheint ?</p>
<p>bis jetzt hab ichs so umständlich mit einer liste von zeilen die einzeln dann durchiteriert wird um ins file zu schreiben.......das geht doch bestimmt einfacher oder ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/122766/in-file-code-schreiben</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 07:17:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/122766.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 09 Oct 2005 19:12:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to in file code schreiben on Sun, 09 Oct 2005 19:12:53 GMT]]></title><description><![CDATA[<p>Hallo gibt es eine einfach art quellcode in ein file zu schreiben ?<br />
also in der art</p>
<p>file &lt;&lt; #include &lt;irgendeinheader.h&gt;</p>
<p>class1 {</p>
<p>}</p>
<p>&lt;&lt; EOF</p>
<p>so dass genau wie ichs zwisschen den &quot;&lt;&lt;&quot; hinschreibe auch im file erscheint ?</p>
<p>bis jetzt hab ichs so umständlich mit einer liste von zeilen die einzeln dann durchiteriert wird um ins file zu schreiben.......das geht doch bestimmt einfacher oder ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888389</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888389</guid><dc:creator><![CDATA[matss]]></dc:creator><pubDate>Sun, 09 Oct 2005 19:12:53 GMT</pubDate></item><item><title><![CDATA[Reply to in file code schreiben on Sun, 09 Oct 2005 19:26:32 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#include &lt;iostream&gt;

using std::cout;

int main( int argc, char** argv ) {
   cout &lt;&lt;
      &quot;#include &lt;iostream&gt;\n&quot;
      &quot;\n&quot;
      &quot;using std::cout;\n&quot;
      &quot;\n&quot;
      &quot;int main( int argc, char** argv ) {\n&quot;
      &quot;   cout &lt;&lt; \&quot;hello world!\\n\&quot;;\n&quot;
      &quot;   return 0;\n&quot;
      &quot;}\n&quot;
   ;
   return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/888397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888397</guid><dc:creator><![CDATA[Power Off]]></dc:creator><pubDate>Sun, 09 Oct 2005 19:26:32 GMT</pubDate></item><item><title><![CDATA[Reply to in file code schreiben on Sun, 09 Oct 2005 19:24:58 GMT]]></title><description><![CDATA[<p>Hallo,<br />
Die einfachste Art ist wohl folgende:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;
using namespace std;

int main()
{
    while(cin.good())
        cout &lt;&lt; cin.rdbuf() &lt;&lt; endl;
    return 0;
}
</code></pre>
<p>Das sieht zwar jetzt nicht besonders toll aus, wird aber doch recht mächtig, wenn man Ein/Ausgabe umleitet.</p>
<p>Beispiel:</p>
<pre><code>prompt~#: ./das_obige_programm &lt; mein_cpp_file.cpp
</code></pre>
<p>Gibt den Inhalt von mein_cpp-file.cpp aus.</p>
<p>oder</p>
<pre><code>prompt~#: ./das_obige_programm &gt; mein_cpp_file.cpp
</code></pre>
<p>Schreibt deine Eingabe nach mein_cpp_file.cpp</p>
<p>Gruß Caipi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888398</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888398</guid><dc:creator><![CDATA[Caipi]]></dc:creator><pubDate>Sun, 09 Oct 2005 19:24:58 GMT</pubDate></item><item><title><![CDATA[Reply to in file code schreiben on Mon, 10 Oct 2005 06:40:00 GMT]]></title><description><![CDATA[<p>hehe, da hat einer <strong>cat</strong> nachgebaut.<br />
Eigentlich mal lustig zu sehen mit wie wenig Code ein so nützliches Programm geschrieben sein kann!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/888549</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/888549</guid><dc:creator><![CDATA[hehejo]]></dc:creator><pubDate>Mon, 10 Oct 2005 06:40:00 GMT</pubDate></item></channel></rss>