<?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[Fehler in Borland-Hilfe]]></title><description><![CDATA[<p>Hallo,</p>
<p>beim Kompilieren eines Beispiels aus der Borland-Hilfe erhalte ich die Fehlermeldung:<br />
E2034 Konvertierung von 'void *' nach 'unsigned char *' nicht möglich</p>
<p>für nachfolgenden Ausdruck:</p>
<pre><code>ptr = pBitmap-&gt;ScanLine[y];
</code></pre>
<p>Nachstehend der Originalcode aus der Hilfe.</p>
<pre><code class="language-cpp">void __fastcall TForm1::Button3Click(TObject *Sender)
{
    Graphics::TBitmap *pBitmap = new Graphics::TBitmap();
    // Dieses Beispiel zeigt das direkte Zeichnen auf die Bitmap
    Byte *ptr;
    try
    {
        pBitmap-&gt;LoadFromFile(&quot;C:\\testfeld\\Bilder\\factory.bmp&quot;);
        for (int y = 0; y &lt; pBitmap-&gt;Height; y++)
        {
            ptr = pBitmap-&gt;ScanLine[y];
            for (int x = 0; x &lt; pBitmap-&gt;Width; x++)
                ptr[x] = (Byte)y;
        }
        Canvas-&gt;Draw(0,0,pBitmap);

    }
    catch (...)
    {
        ShowMessage(&quot;Could not load or alter bitmap&quot;);
    }
    delete pBitmap;
}
</code></pre>
<p>Was ist hier falsch?</p>
<p>Gruß<br />
Leo</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/94619/fehler-in-borland-hilfe</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 00:46:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/94619.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Dec 2004 21:39:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler in Borland-Hilfe on Fri, 10 Dec 2004 21:39:30 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>beim Kompilieren eines Beispiels aus der Borland-Hilfe erhalte ich die Fehlermeldung:<br />
E2034 Konvertierung von 'void *' nach 'unsigned char *' nicht möglich</p>
<p>für nachfolgenden Ausdruck:</p>
<pre><code>ptr = pBitmap-&gt;ScanLine[y];
</code></pre>
<p>Nachstehend der Originalcode aus der Hilfe.</p>
<pre><code class="language-cpp">void __fastcall TForm1::Button3Click(TObject *Sender)
{
    Graphics::TBitmap *pBitmap = new Graphics::TBitmap();
    // Dieses Beispiel zeigt das direkte Zeichnen auf die Bitmap
    Byte *ptr;
    try
    {
        pBitmap-&gt;LoadFromFile(&quot;C:\\testfeld\\Bilder\\factory.bmp&quot;);
        for (int y = 0; y &lt; pBitmap-&gt;Height; y++)
        {
            ptr = pBitmap-&gt;ScanLine[y];
            for (int x = 0; x &lt; pBitmap-&gt;Width; x++)
                ptr[x] = (Byte)y;
        }
        Canvas-&gt;Draw(0,0,pBitmap);

    }
    catch (...)
    {
        ShowMessage(&quot;Could not load or alter bitmap&quot;);
    }
    delete pBitmap;
}
</code></pre>
<p>Was ist hier falsch?</p>
<p>Gruß<br />
Leo</p>
]]></description><link>https://www.c-plusplus.net/forum/post/670619</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/670619</guid><dc:creator><![CDATA[Leo Freitag]]></dc:creator><pubDate>Fri, 10 Dec 2004 21:39:30 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler in Borland-Hilfe on Fri, 10 Dec 2004 22:09:47 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>mach einfach einen cast :</p>
<pre><code class="language-cpp">ptr = (unsigned char *) pBitmap-&gt;ScanLine[y];
</code></pre>
<p>oder exakter</p>
<pre><code class="language-cpp">ptr = reinterpret_cast&lt;unsigned char *&gt; (pBitmap-&gt;ScanLine[y]);
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/670633</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/670633</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Fri, 10 Dec 2004 22:09:47 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler in Borland-Hilfe on Sat, 11 Dec 2004 15:15:18 GMT]]></title><description><![CDATA[<p>In der Hilfe zum BCB5/6 lautet die entsprechende Zeile</p>
<pre><code class="language-cpp">ptr = (Byte *)pBitmap-&gt;ScanLine[y];
</code></pre>
<p>Tip: auf der Borland Website mal nach aktualisierten Hilfedateien für die eigene Version umsehen oder ggf. dort die Version für BCB5 herunterladen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/670949</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/670949</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Sat, 11 Dec 2004 15:15:18 GMT</pubDate></item></channel></rss>