<?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[ofstream Ausgabe in Datei: Text einrücken]]></title><description><![CDATA[<p>Hi,</p>
<p>wie kann ich bei dieser Ausgabe in eine Datei, am Anfang 5 Leerzeichen setzen (ohne diese explizit angeben zu müssen)?</p>
<pre><code>ofstream myfile((const char *)test.c, ios::out); 
myfile &lt;&lt; &quot;\n        eingerückter text\n\n  &quot;;
</code></pre>
<p>Gruß<br />
GJM</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/230438/ofstream-ausgabe-in-datei-text-einrücken</link><generator>RSS for Node</generator><lastBuildDate>Sun, 27 Sep 2026 09:20:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/230438.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 26 Dec 2008 20:50:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ofstream Ausgabe in Datei: Text einrücken on Fri, 26 Dec 2008 20:50:33 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>wie kann ich bei dieser Ausgabe in eine Datei, am Anfang 5 Leerzeichen setzen (ohne diese explizit angeben zu müssen)?</p>
<pre><code>ofstream myfile((const char *)test.c, ios::out); 
myfile &lt;&lt; &quot;\n        eingerückter text\n\n  &quot;;
</code></pre>
<p>Gruß<br />
GJM</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1635894</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1635894</guid><dc:creator><![CDATA[GJM]]></dc:creator><pubDate>Fri, 26 Dec 2008 20:50:33 GMT</pubDate></item><item><title><![CDATA[Reply to ofstream Ausgabe in Datei: Text einrücken on Fri, 26 Dec 2008 22:37:18 GMT]]></title><description><![CDATA[<p>Mein C-Compiler kann sowas nicht schlucken. Ein String als shift Einheit? Noch nie in C gesehen. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1635924</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1635924</guid><dc:creator><![CDATA[supertux]]></dc:creator><pubDate>Fri, 26 Dec 2008 22:37:18 GMT</pubDate></item><item><title><![CDATA[Reply to ofstream Ausgabe in Datei: Text einrücken on Sat, 27 Dec 2008 09:17:03 GMT]]></title><description><![CDATA[<p>supertux schrieb:</p>
<blockquote>
<p>Mein C-Compiler kann sowas nicht schlucken. Ein String als shift Einheit? Noch nie in C gesehen.</p>
</blockquote>
<p>wahrscheinlich verwendet er viel preprozessor-zeug davor. so geht das jedenfalls durch keinen c-compiler der welt.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1636026</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1636026</guid><dc:creator><![CDATA[~fricky]]></dc:creator><pubDate>Sat, 27 Dec 2008 09:17:03 GMT</pubDate></item><item><title><![CDATA[Reply to ofstream Ausgabe in Datei: Text einrücken on Sat, 27 Dec 2008 09:40:45 GMT]]></title><description><![CDATA[<p>Ja. Unwahrscheinlich. Wo soll er denn die Bits auch finden ... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":-)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1636033</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1636033</guid><dc:creator><![CDATA[Scheppertreiber]]></dc:creator><pubDate>Sat, 27 Dec 2008 09:40:45 GMT</pubDate></item><item><title><![CDATA[Reply to ofstream Ausgabe in Datei: Text einrücken on Sat, 27 Dec 2008 14:17:40 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-1819.html" rel="nofollow">rüdiger</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-10.html" rel="nofollow">ANSI C</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1636133</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1636133</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 27 Dec 2008 14:17:40 GMT</pubDate></item><item><title><![CDATA[Reply to ofstream Ausgabe in Datei: Text einrücken on Sat, 27 Dec 2008 15:02:17 GMT]]></title><description><![CDATA[<p>GJM schrieb:</p>
<blockquote>
<p>wie kann ich bei dieser Ausgabe in eine Datei, am Anfang 5 Leerzeichen setzen (ohne diese explizit angeben zu müssen)?</p>
</blockquote>
<p>kenn ich keine variante außer ne klasse zu schreiben, die den operator &lt;&lt; überladen bekommt und dann dort immer die 5 leerzeichen + das, was eigtl ausgegeben werden soll, ausgibt ^^</p>
<pre><code>ofstream myfile((const char *)test.c, ios::out);
</code></pre>
<p>ich vermute mal test.c ist ein std::string:</p>
<pre><code class="language-cpp">std::ofstream myFile (test.c.c_str(), ios::out);
</code></pre>
<p>falls nicht, welchen typ hat test.c dann? (btw ist c nicht gerade das, was ich sprechenden bezeichner nennen würde ^^ test zwar auch nicht aber das liegt evtl auch daran, dass es nen bsp ist ^^)</p>
<p>2 urls die immer mal nützlich sein können:<br />
- <a href="http://www.cplusplus.com/reference/" rel="nofollow">http://www.cplusplus.com/reference/</a><br />
- <a href="http://www.cppreference.com/wiki/" rel="nofollow">http://www.cppreference.com/wiki/</a></p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1636151</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1636151</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Sat, 27 Dec 2008 15:02:17 GMT</pubDate></item></channel></rss>