<?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 zusammenbauen in Variable]]></title><description><![CDATA[<p>Was ich jetzt versuche ist das in buffer_1[ ]der Pfad zusammengebaut drinsteht.<br />
Mit _tprintf klappt das so nur ist char dafür nicht gemacht. Wie löse ich das?</p>
<pre><code>{
    // Valid file path name (file is there).
    char buffer_1[ ] = (&quot;%s\\%s\\Reader\\AcroRd32.dll&quot; ,&quot;c:\\Program Files (x86)\\Adobe&quot;,ffd.cFileName); 
    char *lpStr1;
    lpStr1 = buffer_1;

    // Return value from &quot;PathFileExists&quot;.
    int retval;

    // Search for the presence of a file with a true result.
    retval = PathFileExists(lpStr1);
    if(retval == 1)
    {
        cout &lt;&lt; &quot;Search for the file path of : &quot; &lt;&lt; lpStr1 &lt;&lt; endl;
        cout &lt;&lt; &quot;The file requested \&quot;&quot; &lt;&lt; lpStr1 &lt;&lt; &quot;\&quot; is a valid file&quot; &lt;&lt; endl;
        cout &lt;&lt; &quot;The return from function is : &quot; &lt;&lt; retval &lt;&lt; endl;
    }

    else
    {
        cout &lt;&lt; &quot;\nThe file requested &quot; &lt;&lt; lpStr1 &lt;&lt; &quot; is not a valid file&quot; &lt;&lt; endl;
        cout &lt;&lt; &quot;The return from function is : &quot; &lt;&lt; retval &lt;&lt; endl;
    }

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/322994/pfad-zusammenbauen-in-variable</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 11:27:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/322994.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Jan 2014 09:03:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pfad zusammenbauen in Variable on Wed, 15 Jan 2014 09:03:02 GMT]]></title><description><![CDATA[<p>Was ich jetzt versuche ist das in buffer_1[ ]der Pfad zusammengebaut drinsteht.<br />
Mit _tprintf klappt das so nur ist char dafür nicht gemacht. Wie löse ich das?</p>
<pre><code>{
    // Valid file path name (file is there).
    char buffer_1[ ] = (&quot;%s\\%s\\Reader\\AcroRd32.dll&quot; ,&quot;c:\\Program Files (x86)\\Adobe&quot;,ffd.cFileName); 
    char *lpStr1;
    lpStr1 = buffer_1;

    // Return value from &quot;PathFileExists&quot;.
    int retval;

    // Search for the presence of a file with a true result.
    retval = PathFileExists(lpStr1);
    if(retval == 1)
    {
        cout &lt;&lt; &quot;Search for the file path of : &quot; &lt;&lt; lpStr1 &lt;&lt; endl;
        cout &lt;&lt; &quot;The file requested \&quot;&quot; &lt;&lt; lpStr1 &lt;&lt; &quot;\&quot; is a valid file&quot; &lt;&lt; endl;
        cout &lt;&lt; &quot;The return from function is : &quot; &lt;&lt; retval &lt;&lt; endl;
    }

    else
    {
        cout &lt;&lt; &quot;\nThe file requested &quot; &lt;&lt; lpStr1 &lt;&lt; &quot; is not a valid file&quot; &lt;&lt; endl;
        cout &lt;&lt; &quot;The return from function is : &quot; &lt;&lt; retval &lt;&lt; endl;
    }

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2377361</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2377361</guid><dc:creator><![CDATA[Marabunta]]></dc:creator><pubDate>Wed, 15 Jan 2014 09:03:02 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad zusammenbauen in Variable on Wed, 15 Jan 2014 09:20:59 GMT]]></title><description><![CDATA[<p>Wir sind im C++ Forum, und sprechen daher aus Prinzip kein C.</p>
<pre><code>{
	std::string path = &quot;c:\\Program Files (x86)\\Adobe&quot;;
	path += &quot;\\&quot;;
	path += ffd.cFileName;
	path += &quot;\\Reader\\AcroRd32.dll&quot;;

    int retval = PathFileExists(path.c_str());
    if(retval == 1)
    {
        cout &lt;&lt; &quot;Search for the file path of : &quot; &lt;&lt; path &lt;&lt; endl;
        cout &lt;&lt; &quot;The file requested \&quot;&quot; &lt;&lt; path &lt;&lt; &quot;\&quot; is a valid file&quot; &lt;&lt; endl;
        cout &lt;&lt; &quot;The return from function is : &quot; &lt;&lt; retval &lt;&lt; endl;
    }

    else
    {
        cout &lt;&lt; &quot;\nThe file requested &quot; &lt;&lt; path &lt;&lt; &quot; is not a valid file&quot; &lt;&lt; endl;
        cout &lt;&lt; &quot;The return from function is : &quot; &lt;&lt; retval &lt;&lt; endl;
	}
}
</code></pre>
<p>Und selbst das geht noch in besserem C++, wenn weitere Einzelheiten bekannt seien.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2377363</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2377363</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Wed, 15 Jan 2014 09:20:59 GMT</pubDate></item></channel></rss>