<?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[C2664: char * in VARIANT]]></title><description><![CDATA[<p>Hallo, ich hoffe hier bekomme ich Hilfe.</p>
<p>Mein folgender Code erzeugt ein Fehler den ich nicht wegbekomme. Vielleicht weiß von euch jemand eine lösung, vielleicht ist es auch nur ne Kleinigkeit und ich sehe das nicht.</p>
<p>Hier der Code der den Fehler Verursacht ich nutzte VS2005:</p>
<pre><code class="language-cpp">CString CCANProgView::IntToStr(int iValue)
{
	char chToReceive[20];

	return _itoa(iValue,chToReceive,10);
}
</code></pre>
<p>Der Fehler:<br />
error C2664: 'ATL::CStringT&lt;BaseType,StringTraits&gt;::CStringT(const VARIANT &amp;)': Konvertierung des Parameters 1 von 'char *' in 'const VARIANT &amp;' nicht möglich<br />
with<br />
[<br />
BaseType=wchar_t,<br />
StringTraits=StrTraitMFC_DLL&lt;wchar_t&gt;<br />
]<br />
Ursache: Konvertierung von 'char *' in 'const VARIANT' nicht möglich<br />
Quelltyp konnte von keinem Konstruktor angenommen werden, oder die Überladungsauflösung des Konstruktors ist mehrdeutig</p>
<p>Danke schon mal!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/190162/c2664-char-in-variant</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 15:21:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/190162.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Aug 2007 11:20:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to C2664: char * in VARIANT on Mon, 20 Aug 2007 11:20:33 GMT]]></title><description><![CDATA[<p>Hallo, ich hoffe hier bekomme ich Hilfe.</p>
<p>Mein folgender Code erzeugt ein Fehler den ich nicht wegbekomme. Vielleicht weiß von euch jemand eine lösung, vielleicht ist es auch nur ne Kleinigkeit und ich sehe das nicht.</p>
<p>Hier der Code der den Fehler Verursacht ich nutzte VS2005:</p>
<pre><code class="language-cpp">CString CCANProgView::IntToStr(int iValue)
{
	char chToReceive[20];

	return _itoa(iValue,chToReceive,10);
}
</code></pre>
<p>Der Fehler:<br />
error C2664: 'ATL::CStringT&lt;BaseType,StringTraits&gt;::CStringT(const VARIANT &amp;)': Konvertierung des Parameters 1 von 'char *' in 'const VARIANT &amp;' nicht möglich<br />
with<br />
[<br />
BaseType=wchar_t,<br />
StringTraits=StrTraitMFC_DLL&lt;wchar_t&gt;<br />
]<br />
Ursache: Konvertierung von 'char *' in 'const VARIANT' nicht möglich<br />
Quelltyp konnte von keinem Konstruktor angenommen werden, oder die Überladungsauflösung des Konstruktors ist mehrdeutig</p>
<p>Danke schon mal!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348116</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348116</guid><dc:creator><![CDATA[MFCChris]]></dc:creator><pubDate>Mon, 20 Aug 2007 11:20:33 GMT</pubDate></item><item><title><![CDATA[Reply to C2664: char * in VARIANT on Mon, 20 Aug 2007 11:22:26 GMT]]></title><description><![CDATA[<p>&quot;BaseType=wchar_t,&quot; - das sieh nach einem Unicode-Problem aus - verwende mal lieber wchar_t bzw. TCHAR anstelle von char.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348119</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348119</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Mon, 20 Aug 2007 11:22:26 GMT</pubDate></item><item><title><![CDATA[Reply to C2664: char * in VARIANT on Mon, 20 Aug 2007 11:29:32 GMT]]></title><description><![CDATA[<p>Sorry bin ziemlich neu mit den ganzen kram, wie sieht das dann aus?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348129</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348129</guid><dc:creator><![CDATA[MFCChris]]></dc:creator><pubDate>Mon, 20 Aug 2007 11:29:32 GMT</pubDate></item><item><title><![CDATA[Reply to C2664: char * in VARIANT on Mon, 20 Aug 2007 12:16:03 GMT]]></title><description><![CDATA[<p>Irgendwie scheint mir, dass Deine Funktion CCANProgView::IntToStr anders deklartiert ist. Wie steht es denn im Header der Klasse?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1348195</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1348195</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 20 Aug 2007 12:16:03 GMT</pubDate></item></channel></rss>