<?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[FileStream]]></title><description><![CDATA[<p>Hallo zusammen,<br />
bin noch net lange am C++-Programmieren, also bitte für noobs <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Ich will ne Tabelle (StringGrid) in eine Datei ausgeben, klappt auch wunderbar,<br />
jedoch will ich den Dateiname über eine InpuBox eingeben ohne Dateierweiterung.<br />
Dieser soll programm intern zugeführt werden.</p>
<pre><code>void __fastcall TForm1::Btn_ExportClick(TObject *Sender)
{
AnsiString Export;
Export = InputBox(0, &quot;Dateiname (ohne Erweiterung):&quot;, 0) + &quot;.csv&quot;;

ofstream exp (Export);

if (exp)
{
int x;
    x=StringGrid1-&gt;RowCount;

    for (int i=0; i&lt;x; i++)
    {
        exp &lt;&lt;  StringGrid1-&gt;Cells[0][i].c_str() &lt;&lt; &quot;;&quot; &lt;&lt;
                StringGrid1-&gt;Cells[1][i].c_str() &lt;&lt; &quot;;&quot; &lt;&lt;
                StringGrid1-&gt;Cells[2][i].c_str() &lt;&lt; &quot;;&quot; &lt;&lt;
                StringGrid1-&gt;Cells[3][i].c_str() &lt;&lt; &quot;;&quot; &lt;&lt;
                StringGrid1-&gt;Cells[4][i].c_str() &lt;&lt; endl;
    }
    exp.close();
}
}
</code></pre>
<p>Fehlermeldung:</p>
<pre><code>[C++ Error] Unit1.cpp(101): E2285 Could not find a match for 'ofstream::basic_ofstream(AnsiString)'
</code></pre>
<p>Danke Schonmal<br />
MFG Arogarth</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/138982/filestream</link><generator>RSS for Node</generator><lastBuildDate>Sun, 02 Aug 2026 17:30:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/138982.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Mar 2006 18:43:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to FileStream on Thu, 02 Mar 2006 18:43:09 GMT]]></title><description><![CDATA[<p>Hallo zusammen,<br />
bin noch net lange am C++-Programmieren, also bitte für noobs <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Ich will ne Tabelle (StringGrid) in eine Datei ausgeben, klappt auch wunderbar,<br />
jedoch will ich den Dateiname über eine InpuBox eingeben ohne Dateierweiterung.<br />
Dieser soll programm intern zugeführt werden.</p>
<pre><code>void __fastcall TForm1::Btn_ExportClick(TObject *Sender)
{
AnsiString Export;
Export = InputBox(0, &quot;Dateiname (ohne Erweiterung):&quot;, 0) + &quot;.csv&quot;;

ofstream exp (Export);

if (exp)
{
int x;
    x=StringGrid1-&gt;RowCount;

    for (int i=0; i&lt;x; i++)
    {
        exp &lt;&lt;  StringGrid1-&gt;Cells[0][i].c_str() &lt;&lt; &quot;;&quot; &lt;&lt;
                StringGrid1-&gt;Cells[1][i].c_str() &lt;&lt; &quot;;&quot; &lt;&lt;
                StringGrid1-&gt;Cells[2][i].c_str() &lt;&lt; &quot;;&quot; &lt;&lt;
                StringGrid1-&gt;Cells[3][i].c_str() &lt;&lt; &quot;;&quot; &lt;&lt;
                StringGrid1-&gt;Cells[4][i].c_str() &lt;&lt; endl;
    }
    exp.close();
}
}
</code></pre>
<p>Fehlermeldung:</p>
<pre><code>[C++ Error] Unit1.cpp(101): E2285 Could not find a match for 'ofstream::basic_ofstream(AnsiString)'
</code></pre>
<p>Danke Schonmal<br />
MFG Arogarth</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1007046</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1007046</guid><dc:creator><![CDATA[Arogarth]]></dc:creator><pubDate>Thu, 02 Mar 2006 18:43:09 GMT</pubDate></item><item><title><![CDATA[Reply to FileStream on Thu, 02 Mar 2006 18:49:52 GMT]]></title><description><![CDATA[<p>1. Falsches Forum.</p>
<ol start="2">
<li></li>
</ol>
<pre><code class="language-cpp">AnsiString Export;

ofstream exp (Export);
</code></pre>
<p>Export ist vom Typ AnsiString, wie dir sicher aufgefallen ist. Deine Fehlermeldung sagt, aber, dass basic_ofstream keinen Konstruktor hat das einen AnsiString aufnimmt. basic_ofstream ist, denke ich mal, ofstream. Dieses kann aber einen char* aufnehmen.</p>
<p>Bei der Ausgabe der Zelleninhalte ist dir offensichtlich aufgefallen, wie man aus einem AnsiString ein char* erhält. Genauso musst du es auch hier machen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1007051</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1007051</guid><dc:creator><![CDATA[zocker]]></dc:creator><pubDate>Thu, 02 Mar 2006 18:49:52 GMT</pubDate></item><item><title><![CDATA[Reply to FileStream on Thu, 02 Mar 2006 19:16:10 GMT]]></title><description><![CDATA[<p>also verwendest du AnsiString::c_str()<br />
under gleich einen std::string oder char*</p>
<p>es it numal ncih gtu VCL/CLX/MFC u.Ä. und STD zumischen un zu erwarten dass alles ohen wrapper/converter funzt...</p>
<p>Mfg Shade37337</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1007083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1007083</guid><dc:creator><![CDATA[branleb]]></dc:creator><pubDate>Thu, 02 Mar 2006 19:16:10 GMT</pubDate></item><item><title><![CDATA[Reply to FileStream on Thu, 02 Mar 2006 19:22:09 GMT]]></title><description><![CDATA[<p>shade37337 schrieb:</p>
<blockquote>
<p>also verwendest du AnsiString::c_str()<br />
under gleich einen std::string oder char*</p>
<p>es it numal ncih gtu VCL/CLX/MFC u.Ä. und STD zumischen un zu erwarten dass alles ohen wrapper/converter funzt...</p>
<p>Mfg Shade37337</p>
</blockquote>
<p>Ich weiß ja, du hast mal gesagt, dass deine Rechtschreibung mies ist, aber könntest du nicht wenigstens bevor du auf Absenden klickst, die Vorschau durchlesen und Fehler korrigieren? Dein Text ist grammatikalisch echt der Horror.</p>
<p>MfG</p>
<p>GPC</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1007085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1007085</guid><dc:creator><![CDATA[GPC]]></dc:creator><pubDate>Thu, 02 Mar 2006 19:22:09 GMT</pubDate></item><item><title><![CDATA[Reply to FileStream on Fri, 03 Mar 2006 09:41:55 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=2" rel="nofollow">VCL/CLX (Borland C++ Builder)</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=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/1007410</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1007410</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 03 Mar 2006 09:41:55 GMT</pubDate></item></channel></rss>