<?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[passenden Code C++ hier posten?]]></title><description><![CDATA[<p>Der folgend Codefragment soll den Kern meines Programmierproblem in Ubuntu und C++ beschreiben.<br />
dataus.open (&quot;/home/ygdrasil/Arbeitsfläche/Datei/2013/&quot;+Monat2+&quot;/&quot;+Monat1+&quot;/&quot;+&quot;KL.dat&quot; , ios_base::app );</p>
<blockquote>
<blockquote>
<blockquote>
<p>|Fehler: keine passende Funktion für Aufruf von »std::basic_ofstream&lt;char&gt;::open(std::basic_string&lt;char&gt;, const openmode&amp;)«|</p>
</blockquote>
</blockquote>
</blockquote>
<p>Wenn ich mein C++ Codefragment ändere bekomme ich</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;cstdio&gt;
#include &lt;cstdlib&gt;
#include &lt;cstring&gt;
#include &lt;ctime&gt;
#include &lt;sstream&gt;
#include &lt;time.h&gt;
#include &lt;string&gt;
#include &lt;sys/stat.h&gt;
          using namespace std;
string dataus,mystring;
int blubblub;
int main()
{

mystring=(&quot;/home/ygdrasil/Arbeitsfläche/Datei/2013/&quot;+Monat2+&quot;/&quot;+Monat1+&quot;/&quot;+&quot;KL.dat&quot; , ios_base::app );
ofstream dataus;
dataus.open(mystring, ios_base::app);
</code></pre>
<p>dataus &lt;&lt; &quot;Neue variabell für 2014: Euro:&quot; &lt;&lt; blubblub &lt;&lt; endl;<br />
dataus.close();<br />
}<br />
[/code]</p>
<blockquote>
<blockquote>
<p>&gt; Mit mystring funktioniert der Code auch nicht.</p>
</blockquote>
</blockquote>
<p>Mein Ziel wenn es wie oben nicht funktioniert:<br />
Ich will was ich als C++ Anfänger nicht begreife,<br />
einen Monatsordner in (Zahlen,string 1 bis 12) erstellen in dem jeder Tag ein Ordner (in Zahlen String,1 bis 31) erstellt wird, in diesen Ordner soll eine Textdatei(also in den Tagesordner) &lt;&lt;Datei.txt<br />
Wer könnte mir passenden Code C++ hier posten?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/321922/passenden-code-c-hier-posten</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 16:58:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/321922.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Nov 2013 05:25:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 07:35:58 GMT]]></title><description><![CDATA[<p>Der folgend Codefragment soll den Kern meines Programmierproblem in Ubuntu und C++ beschreiben.<br />
dataus.open (&quot;/home/ygdrasil/Arbeitsfläche/Datei/2013/&quot;+Monat2+&quot;/&quot;+Monat1+&quot;/&quot;+&quot;KL.dat&quot; , ios_base::app );</p>
<blockquote>
<blockquote>
<blockquote>
<p>|Fehler: keine passende Funktion für Aufruf von »std::basic_ofstream&lt;char&gt;::open(std::basic_string&lt;char&gt;, const openmode&amp;)«|</p>
</blockquote>
</blockquote>
</blockquote>
<p>Wenn ich mein C++ Codefragment ändere bekomme ich</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;cstdio&gt;
#include &lt;cstdlib&gt;
#include &lt;cstring&gt;
#include &lt;ctime&gt;
#include &lt;sstream&gt;
#include &lt;time.h&gt;
#include &lt;string&gt;
#include &lt;sys/stat.h&gt;
          using namespace std;
string dataus,mystring;
int blubblub;
int main()
{

mystring=(&quot;/home/ygdrasil/Arbeitsfläche/Datei/2013/&quot;+Monat2+&quot;/&quot;+Monat1+&quot;/&quot;+&quot;KL.dat&quot; , ios_base::app );
ofstream dataus;
dataus.open(mystring, ios_base::app);
</code></pre>
<p>dataus &lt;&lt; &quot;Neue variabell für 2014: Euro:&quot; &lt;&lt; blubblub &lt;&lt; endl;<br />
dataus.close();<br />
}<br />
[/code]</p>
<blockquote>
<blockquote>
<p>&gt; Mit mystring funktioniert der Code auch nicht.</p>
</blockquote>
</blockquote>
<p>Mein Ziel wenn es wie oben nicht funktioniert:<br />
Ich will was ich als C++ Anfänger nicht begreife,<br />
einen Monatsordner in (Zahlen,string 1 bis 12) erstellen in dem jeder Tag ein Ordner (in Zahlen String,1 bis 31) erstellt wird, in diesen Ordner soll eine Textdatei(also in den Tagesordner) &lt;&lt;Datei.txt<br />
Wer könnte mir passenden Code C++ hier posten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368804</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368804</guid><dc:creator><![CDATA[Mister C++]]></dc:creator><pubDate>Fri, 29 Nov 2013 07:35:58 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 09:24:10 GMT]]></title><description><![CDATA[<p>Der ofstream-Konstruktor sowie die open-Funktion kennen vor C++11 nur einen &quot;const char *&quot;-Parameter, keinen std::string, also</p>
<pre><code class="language-cpp">string filename = &quot;/home/ygdrasil/Arbeitsfläche/Datei/2013/&quot;+Monat2+&quot;/&quot;+Monat1+&quot;/&quot;+&quot;KL.dat&quot;;
ofstream dataus(filename.c_str(), ios_base::app);
</code></pre>
<p>(bitte keine globalen Variablen benutzen)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368833</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368833</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Fri, 29 Nov 2013 09:24:10 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 10:11:05 GMT]]></title><description><![CDATA[<p>Danke an Th69.</p>
<blockquote>
<p>Der ofstream-Konstruktor sowie die open-Funktion kennen vor C++11 nur einen &quot;const char *&quot;-Parameter, keinen std::string, also ...</p>
</blockquote>
<p>Gibt es denn eine Alternative in C++ die<br />
mein Ziel wenn es wie oben nicht funktioniert:</p>
<blockquote>
<p>Ich will was ich als C++ Anfänger nicht begreife,<br />
einen Monatsordner in (Zahlen,string 1 bis 12) erstellen in dem jeder Tag ein Ordner (in Zahlen String,1 bis 31) erstellt wird, in diesen Ordner soll eine Textdatei(also in den Tagesordner) &lt;&lt;Datei.txt<br />
Wer könnte mir passenden Code C++ hier posten?</p>
</blockquote>
<p>am nächsten kämme?<br />
Und wichtig pro Tag, soll ein Ordner neu sein!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368844</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368844</guid><dc:creator><![CDATA[Mister C++]]></dc:creator><pubDate>Fri, 29 Nov 2013 10:11:05 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 10:28:40 GMT]]></title><description><![CDATA[<p>Mister C++ schrieb:</p>
<blockquote>
<p>Gibt es denn eine Alternative in C++</p>
</blockquote>
<p>Hat er doch schon beschrieben: Die c_str-Methode.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368862</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368862</guid><dc:creator><![CDATA[nman]]></dc:creator><pubDate>Fri, 29 Nov 2013 10:28:40 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 10:28:58 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/u4178" rel="nofollow">nman</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/f5" rel="nofollow">Linux/Unix</a> in das Forum <a href="http://www.c-plusplus.net/forum/f15" rel="nofollow">C++ (auch C++0x und C++11)</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/39405" 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/2368864</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368864</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 29 Nov 2013 10:28:58 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 12:23:37 GMT]]></title><description><![CDATA[<pre><code>string filename = &quot;/home/ygdrasil/Arbeitsfläche/Datei/2013/&quot;+Monat2+&quot;/&quot;+Monat1+&quot;/&quot;+&quot;KL.dat&quot;;
ofstream dataus(filename.c_str(), ios_base::app);
dataus &lt;&lt; &quot;Neue variabell für 2014: Euro:&quot; &lt;&lt; blubblub &lt;&lt; endl;
dataus.close();
</code></pre>
<p>Funktioniert hat das nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368893</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368893</guid><dc:creator><![CDATA[Mister C++]]></dc:creator><pubDate>Fri, 29 Nov 2013 12:23:37 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 12:37:05 GMT]]></title><description><![CDATA[<p>ja natürlich. der std::string ist nicht dazu da, verschiedene datentypen in text zu wandeln. dafür nutzt man std::ostringstream. ist man da fertig mit schreiben, kann man sich den generierten text bequem mit .str() holen gehen. weil du einen c-string brauchst für den fstream würde es aber .str().c_str() lauten.</p>
<p>offtopic:<br />
- es heisst &quot;variable&quot;.<br />
- der explizite close-aufruf ist höchstwahrscheinlich unnötig. (kann auch sein dass ich mit irre, je nach dem was nach dem listing für code kommt)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368899</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368899</guid><dc:creator><![CDATA[asfasdf]]></dc:creator><pubDate>Fri, 29 Nov 2013 12:37:05 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 15:17:26 GMT]]></title><description><![CDATA[<p>Ja, weil du in C++ nicht (wie in Java) Strings und andere Datentypen per '+' zusammenketten kannst.</p>
<pre><code>std::string mystring = &quot;...&quot;;
std::ofstream dataus(mystring.c_str()); // das geht alles
</code></pre>
<pre><code>int i = 0;
double d = 3.14;
std::string mystring = &quot;abc&quot; + i + &quot;def&quot; + d; // geht nicht

// ---&gt;
std::string mystring = &quot;abc&quot; + std::to_string(i) + &quot;def&quot; + std::to_string(d); // geht mit C++11
</code></pre>
<p>Achtung!</p>
<pre><code>std::string mystring = &quot;abc&quot; + &quot;def&quot; + &quot;ghi&quot;; // geht nicht!
</code></pre>
<p>edit: essentielle syntaktische Fehler beseitigt -.-</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368900</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368900</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Fri, 29 Nov 2013 15:17:26 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 12:57:13 GMT]]></title><description><![CDATA[<pre><code>std::string mystring = &quot;...&quot;;
std::ofstreamdataus(mystringc_str());
</code></pre>
<p>Leider muss ich dem letzt genannten Posting wiedersprechen, zur Unterstützung hier der Compileroutput&gt;&gt;</p>
<blockquote>
<p>Fehler: »ofstreamdataus« ist kein Element von »std«|</p>
</blockquote>
<p>Wie mache ich »ofstreamdataus« zum Element von »std« ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368908</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368908</guid><dc:creator><![CDATA[Mister C++]]></dc:creator><pubDate>Fri, 29 Nov 2013 12:57:13 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 13:03:05 GMT]]></title><description><![CDATA[<p>Mister C++ schrieb:</p>
<blockquote>
<pre><code>std::string mystring = &quot;...&quot;;
std::ofstreamdataus(mystringc_str());
</code></pre>
<p>Leider muss ich dem letzt genannten Posting wiedersprechen, zur Unterstützung hier der Compileroutput&gt;&gt;</p>
<blockquote>
<p>Fehler: »ofstreamdataus« ist kein Element von »std«|</p>
</blockquote>
<p>Wie mache ich »ofstreamdataus« zum Element von »std« ?</p>
</blockquote>
<p>du liest also meine posts nicht? gut, dann brauche ich ja künftig nicht mehr zu antworten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368912</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368912</guid><dc:creator><![CDATA[asfasdf]]></dc:creator><pubDate>Fri, 29 Nov 2013 13:03:05 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 14:15:00 GMT]]></title><description><![CDATA[<p>Mister C++ schrieb:</p>
<blockquote>
<pre><code>std::string mystring = &quot;...&quot;;
std::ofstreamdataus(mystringc_str());
</code></pre>
<p>Leider muss ich dem letzt genannten Posting wiedersprechen, zur Unterstützung hier der Compileroutput&gt;&gt;</p>
<blockquote>
<p>Fehler: »ofstreamdataus« ist kein Element von »std«|</p>
</blockquote>
<p>Wie mache ich »ofstreamdataus« zum Element von »std« ?</p>
</blockquote>
<p>Hatte mich vertippt und das Leerzeichen zwischen std::OFSTREAM und DATAUS vergessen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368926</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368926</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Fri, 29 Nov 2013 14:15:00 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 14:46:32 GMT]]></title><description><![CDATA[<p>Leider komme ich so nicht weiter.<br />
Ich programmiere weiterhin mit g++ in Ubuntu s.o (Code::Blocks ist die Ide).<br />
Leider kann ich jetzt den passenden Codefragment nicht posten.<br />
Dafür den Compileroutput, un der hat relativ viele Fehler.</p>
<pre><code>Fehler: invalid pure specifier (only »= 0« is allowed) before »;« token|
Fehler: Funktion »std::string mystringc_str()« ist wie eine Variable initialisiert|
Fehler: keine passende Funktion für Aufruf von »std::basic_ofstream&lt;char&gt;::basic_ofstream(std::string)«|
Anmerkung: Kandidaten sind:|
Anmerkung: std::basic_ofstream&lt;_CharT, _Traits&gt;::basic_ofstream(const char*, std::ios_base::openmode) [mit _CharT = char, _Traits = std::char_traits&lt;char&gt;, std::ios_base::openmode = std::_Ios_Openmode]|
Anmerkung:   keine bekannte Umwandlung für Argument 1 von »std::string {aka std::basic_string&lt;char&gt;}« nach »const char*«|
Anmerkung: std::basic_ofstream&lt;_CharT, _Traits&gt;::basic_ofstream() [mit _CharT = char, _Traits = std::char_traits&lt;char&gt;]|
Anmerkung:   Kandidat erwartet 0 Argumente, 1 angegeben|
Anmerkung: std::basic_ofstream&lt;char&gt;::basic_ofstream(const std::basic_ofstream&lt;char&gt;&amp;)|
Anmerkung:   keine bekannte Umwandlung für Argument 1 von »std::string {aka std::basic_string&lt;char&gt;}« nach »const std::basic_ofstream&lt;char&gt;&amp;«|
||=== Erstellen beendet: 10 Fehler, 0 Warnungen===|
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2368929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368929</guid><dc:creator><![CDATA[Mister C++]]></dc:creator><pubDate>Fri, 29 Nov 2013 14:46:32 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 14:49:31 GMT]]></title><description><![CDATA[<p>Ja, Skymosho hat auch noch den Punkt vergessen.<br />
Folgende Anleitung:<br />
Zusammensetzten des Pfades mit ostringstream.<br />
Den std::string dann via c_str konvertieren.<br />
Wenn du hier jetzt etwas nicht verstehst, google.<br />
Das ist viel besser als einfach ohne Sinn und Verstand Codezeilen hier aus dem Forum reinzukopieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368931</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368931</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Fri, 29 Nov 2013 14:49:31 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 15:18:16 GMT]]></title><description><![CDATA[<p>-.- Stimmt hast Recht, doofe Tastatur. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Andererseits CodeBlocks hat eine AutoCompletion, die kann in solchen Fällen auch helfen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368936</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368936</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Fri, 29 Nov 2013 15:18:16 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 17:08:38 GMT]]></title><description><![CDATA[<p>Nathan</p>
<blockquote>
<p>Den std::string dann via c_str konvertieren.</p>
</blockquote>
<p>Das habe ich nicht verstanden.<br />
Erklär das mal genauer.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368962</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368962</guid><dc:creator><![CDATA[Mister C++]]></dc:creator><pubDate>Fri, 29 Nov 2013 17:08:38 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Fri, 29 Nov 2013 17:18:07 GMT]]></title><description><![CDATA[<p>Mister C++ schrieb:</p>
<blockquote>
<p>Nathan</p>
<blockquote>
<p>Den std::string dann via c_str konvertieren.</p>
</blockquote>
<p>Das habe ich nicht verstanden.<br />
Erklär das mal genauer.</p>
</blockquote>
<p>std::string hat eine Memberfunktion c_str(), die einen const char* zurückliefert.<br />
Beispiele findest du hier massig im Thread.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2368966</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2368966</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Fri, 29 Nov 2013 17:18:07 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Sat, 30 Nov 2013 05:05:58 GMT]]></title><description><![CDATA[<p>Dieses</p>
<blockquote>
<p>Memberfunktion c_str()</p>
</blockquote>
<p>suchte ich in <a href="http://www.c-plusplus.net/forum/search" rel="nofollow">http://www.c-plusplus.net/forum/search</a><br />
als Antwort bekamm ich</p>
<blockquote>
<p>Keine Beiträge entsprechen Ihren Kriterien.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/2369034</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2369034</guid><dc:creator><![CDATA[Mister C++]]></dc:creator><pubDate>Sat, 30 Nov 2013 05:05:58 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Sat, 30 Nov 2013 05:49:41 GMT]]></title><description><![CDATA[<p>asfasdf schrieb:</p>
<blockquote>
<p>ja natürlich. der std::string ist nicht dazu da, verschiedene datentypen in text zu wandeln. dafür nutzt man std::ostringstream. ist man da fertig mit schreiben, kann man sich den generierten text bequem mit .str() holen gehen. weil du einen c-string brauchst für den fstream würde es aber .str().c_str() lauten.</p>
<p>offtopic:<br />
- es heisst &quot;variable&quot;.<br />
- der explizite close-aufruf ist höchstwahrscheinlich unnötig. (kann auch sein dass ich mit irre, je nach dem was nach dem listing für code kommt)</p>
</blockquote>
<p>Warum so verkrampft umständlich?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2369036</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2369036</guid><dc:creator><![CDATA[schuettelmitkopf]]></dc:creator><pubDate>Sat, 30 Nov 2013 05:49:41 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Sat, 30 Nov 2013 07:13:17 GMT]]></title><description><![CDATA[<p>Mister C++ schrieb:</p>
<blockquote>
<p>Dieses</p>
<blockquote>
<p>Memberfunktion c_str()</p>
</blockquote>
<p>suchte ich in <a href="http://www.c-plusplus.net/forum/search" rel="nofollow">http://www.c-plusplus.net/forum/search</a><br />
als Antwort bekamm ich</p>
<blockquote>
<p>Keine Beiträge entsprechen Ihren Kriterien.</p>
</blockquote>
</blockquote>
<p>Lies dir einfach nochmal alle Beiträge in diesem Thread durch...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2369039</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2369039</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Sat, 30 Nov 2013 07:13:17 GMT</pubDate></item><item><title><![CDATA[Reply to passenden Code C++ hier posten? on Sat, 30 Nov 2013 15:17:25 GMT]]></title><description><![CDATA[<p>schuettelmitkopf schrieb:</p>
<blockquote>
<p>asfasdf schrieb:</p>
<blockquote>
<p>ja natürlich. der std::string ist nicht dazu da, verschiedene datentypen in text zu wandeln. dafür nutzt man std::ostringstream. ist man da fertig mit schreiben, kann man sich den generierten text bequem mit .str() holen gehen. weil du einen c-string brauchst für den fstream würde es aber .str().c_str() lauten.</p>
<p>offtopic:<br />
- es heisst &quot;variable&quot;.<br />
- der explizite close-aufruf ist höchstwahrscheinlich unnötig. (kann auch sein dass ich mit irre, je nach dem was nach dem listing für code kommt)</p>
</blockquote>
<p>Warum so verkrampft umständlich?</p>
</blockquote>
<p>wie sonst? dir ist schon klar, dass es keinen effekt auf sprintf hat, den operator&lt;&lt; für eigene klassen zu überladen? und du weisst auch dass sprintf variadic parameters hat, die nicht typsicher sind?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2369089</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2369089</guid><dc:creator><![CDATA[asfasdf]]></dc:creator><pubDate>Sat, 30 Nov 2013 15:17:25 GMT</pubDate></item></channel></rss>