<?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[Pfad von neu erstellten Datei bestimmen]]></title><description><![CDATA[<p>Hallo leute,</p>
<p>Ich habe mal ne trivial frage... Wie kann ich den Pfad der erzeugten Datei explizit bestimmen ? Ich möchte nicht, dass es im selben Ordner erstellt wird sondern auf dem Desktop!</p>
<p>hier ist die Methode zum erstellen der Datei...</p>
<p>:</p>
<pre><code>std::ofstream write( &quot;Test.text&quot; );
</code></pre>
<p>................</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/234351/pfad-von-neu-erstellten-datei-bestimmen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 14:42:38 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/234351.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Feb 2009 19:15:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pfad von neu erstellten Datei bestimmen on Mon, 16 Feb 2009 19:15:19 GMT]]></title><description><![CDATA[<p>Hallo leute,</p>
<p>Ich habe mal ne trivial frage... Wie kann ich den Pfad der erzeugten Datei explizit bestimmen ? Ich möchte nicht, dass es im selben Ordner erstellt wird sondern auf dem Desktop!</p>
<p>hier ist die Methode zum erstellen der Datei...</p>
<p>:</p>
<pre><code>std::ofstream write( &quot;Test.text&quot; );
</code></pre>
<p>................</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1664904</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1664904</guid><dc:creator><![CDATA[undercover]]></dc:creator><pubDate>Mon, 16 Feb 2009 19:15:19 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad von neu erstellten Datei bestimmen on Mon, 16 Feb 2009 19:20:36 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">// 1.
std::ofstream write(&quot;C:\\User\\Desktop\\Test.text&quot;);
</code></pre>
<p>mit SHGetFolderPath kannst du unter windows den pfad des desktops erfragen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1664908</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1664908</guid><dc:creator><![CDATA[desktoppfad]]></dc:creator><pubDate>Mon, 16 Feb 2009 19:20:36 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad von neu erstellten Datei bestimmen on Mon, 16 Feb 2009 19:43:10 GMT]]></title><description><![CDATA[<p>Also ich habe es explizit reingeschrieben hat leider nicht funktioniert...</p>
<p>Wie siehts mit SHGetFolderPath der Abfrage aus ? Wie kriege ich das hin ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1664914</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1664914</guid><dc:creator><![CDATA[undercover]]></dc:creator><pubDate>Mon, 16 Feb 2009 19:43:10 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad von neu erstellten Datei bestimmen on Mon, 16 Feb 2009 20:22:37 GMT]]></title><description><![CDATA[<p>Wo wir schonmal bei Aktuellen Pfaden sind, wie kriege ich es hin das es mir bei QT nicht den Installierten Pfad öffnet sondern den vom Desktop wenn ich den Button klicke....</p>
<p>das ist der source file:</p>
<pre><code>dir = QFileDialog::getOpenFileName(this,
                                tr(&quot;Find Files&quot;), QDir::currentPath());

   	 ui.lineEdit-&gt;setText(dir1);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1664937</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1664937</guid><dc:creator><![CDATA[undercover (gast)]]></dc:creator><pubDate>Mon, 16 Feb 2009 20:22:37 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad von neu erstellten Datei bestimmen on Mon, 16 Feb 2009 22:17:08 GMT]]></title><description><![CDATA[<p>desktoppfad schrieb:</p>
<blockquote>
<pre><code class="language-cpp">std::ofstream write(&quot;C:\\User\\Desktop\\Test.text&quot;);
</code></pre>
</blockquote>
<p>Hier vielleicht nicht sehr relevant, aber grundsätzlich solltest du den plattformunabhängigen Slash / dem Backslash vorziehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1664995</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1664995</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Mon, 16 Feb 2009 22:17:08 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad von neu erstellten Datei bestimmen on Mon, 16 Feb 2009 23:31:45 GMT]]></title><description><![CDATA[<p>Also viel gebracht hat diese Explizite angabe leider auch nicht! Es speichert mir die Datei in so einen komischen binary ordner!!! <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1665037</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665037</guid><dc:creator><![CDATA[undercover (gast)]]></dc:creator><pubDate>Mon, 16 Feb 2009 23:31:45 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad von neu erstellten Datei bestimmen on Tue, 17 Feb 2009 10:16:28 GMT]]></title><description><![CDATA[<p>Zum Auffinden diverser Systemverzeichnisse habe ich mal das hier gefunden.</p>
<pre><code class="language-cpp">std::string GetSpecialFolder(int Folder)
{
    LPITEMIDLIST  pidl;
    LPMALLOC      pShellMalloc;
    char          szDir[MAX_PATH];
    // SHGetSpecialFolderLocation generates a PIDL. The memory for the PIDL
    // is allocated by the shell, and should be freed using the shell
    // mallocator COM object. Use SHGetMalloc to retrieve the malloc object
    std::string result(&quot;&quot;);
    if(SUCCEEDED(SHGetMalloc(&amp;pShellMalloc)))
    {
        // if we were able to get the shell malloc object, then
        // proceed by fetching the pidl
        HRESULT hdres = SHGetSpecialFolderLocation(NULL, Folder, &amp;pidl);
        if(hdres == S_OK)
        {
            // return is true if success
            if(SHGetPathFromIDList(pidl, szDir))
            {
                result = szDir;
            }
            pShellMalloc-&gt;Free(pidl);
        }
        pShellMalloc-&gt;Release();
    }
    return result;
}
</code></pre>
<p>Für Folder gibt man dann die symbolische Konstante das gewünschten Pfades an. Für den Desktop wäre das z.Bsp. CSIDL_COMMON_DESKTOPDIRECTORY (All Users) oder CSIDL_DESKTOPDIRECTORY (angemeldeter Nutzer) oder CSIDL_DESKTOP (???).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1665180</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665180</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Tue, 17 Feb 2009 10:16:28 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad von neu erstellten Datei bestimmen on Tue, 17 Feb 2009 10:52:25 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-10455.html" rel="nofollow">evilissimo</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</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/1665190</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1665190</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 17 Feb 2009 10:52:25 GMT</pubDate></item></channel></rss>