<?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[SetFileAttributs und daraus resultierende Probleme]]></title><description><![CDATA[<pre><code>int main(int argc, char * argv[])
{
  SetFileAttributes(
                     argv[1],
                     FILE_ATTRIBUTE_NORMAL
                    );

  return 0;
}
</code></pre>
<p>Leider erhalte ich folgenden Fehler:<br />
:Cannot convert parameter 1 from 'char*' to 'const unsigned short*'<br />
Types pointed to are unrelated; conversion requieres reinterpret_cast, C-style cast or function-style cast.</p>
<p>Ich bin nicht sehr erfahren und habe noch probleme mit den formaten bzw den umhercasten jener. Es mag vielleicht wirklich ein triviales problem sein. Doch fehlt mir hier leider noch wissen...</p>
<p>Vielleicht kann mir ja jemand helfen.</p>
<p>Herzlichen Dank</p>
<p>Lg moi</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/184310/setfileattributs-und-daraus-resultierende-probleme</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Jul 2026 11:16:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/184310.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 14 Jun 2007 08:20:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SetFileAttributs und daraus resultierende Probleme on Thu, 14 Jun 2007 08:20:16 GMT]]></title><description><![CDATA[<pre><code>int main(int argc, char * argv[])
{
  SetFileAttributes(
                     argv[1],
                     FILE_ATTRIBUTE_NORMAL
                    );

  return 0;
}
</code></pre>
<p>Leider erhalte ich folgenden Fehler:<br />
:Cannot convert parameter 1 from 'char*' to 'const unsigned short*'<br />
Types pointed to are unrelated; conversion requieres reinterpret_cast, C-style cast or function-style cast.</p>
<p>Ich bin nicht sehr erfahren und habe noch probleme mit den formaten bzw den umhercasten jener. Es mag vielleicht wirklich ein triviales problem sein. Doch fehlt mir hier leider noch wissen...</p>
<p>Vielleicht kann mir ja jemand helfen.</p>
<p>Herzlichen Dank</p>
<p>Lg moi</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1305411</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1305411</guid><dc:creator><![CDATA[Exitus222]]></dc:creator><pubDate>Thu, 14 Jun 2007 08:20:16 GMT</pubDate></item><item><title><![CDATA[Reply to SetFileAttributs und daraus resultierende Probleme on Thu, 14 Jun 2007 09:12:14 GMT]]></title><description><![CDATA[<p>Du hast Dein Programm mit den Flags für Unicode erzeugt!<br />
Möglichkeiten:<br />
1. Du verwendest eine MBCS Projekteinstellung<br />
2. Du verwendest A2T oder CA2T um argv[1] zu konvertieren.<br />
3. Du verwendest SetFileAttributesA</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1305459</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1305459</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Thu, 14 Jun 2007 09:12:14 GMT</pubDate></item><item><title><![CDATA[Reply to SetFileAttributs und daraus resultierende Probleme on Thu, 14 Jun 2007 09:58:18 GMT]]></title><description><![CDATA[<p>Naja, ich würde die bessere Variante 4 verwenden: Umstellen auf TCHAR!!!!!!</p>
<pre><code class="language-cpp">#include &lt;windows.h&gt;
#include &lt;tchar.h&gt;

int _tmain(int argc, _TCHAR* argv[])
{
  SetFileAttributes(argv[1], FILE_ATTRIBUTE_NORMAL);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1305500</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1305500</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 14 Jun 2007 09:58:18 GMT</pubDate></item><item><title><![CDATA[Reply to SetFileAttributs und daraus resultierende Probleme on Thu, 14 Jun 2007 10:26:39 GMT]]></title><description><![CDATA[<p>Du hast natürlich recht Jochen!<br />
Das ist die beste Variante!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1305533</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1305533</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Thu, 14 Jun 2007 10:26:39 GMT</pubDate></item></channel></rss>