<?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[Probleme mit Zeigern]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>mal wieder eine Anfängerfrage, aber mit den ganzen Zeigern hab ich noch ein kleines Problem. Ich habe folgenden Funktion:</p>
<pre><code class="language-cpp">bool usbInterface::read( BYTE* output[261] )
{
	unsigned long	BytesRead; 
	BYTE            getstring[261];

	if ( connected )
	{
		ReadFile( DeviceHandle, getstring, 261, &amp;BytesRead, NULL ); 
		printf(&quot; \n ReadFile: 0x%X\n&quot;, getstring[261]);

		output = *getstring;
		return true;
	}
	return false;

}
</code></pre>
<p>und die will ich in main() ungefähr so aufrufen:</p>
<pre><code class="language-cpp">BYTE test[261];
myInterface.read( &amp;test );
</code></pre>
<p>so von der idee her müsste alles stimmen, nur bin ich mal wieder total mit den Zeigern durcheinander gekommen. kann mir da vll jemand helfen?</p>
<p>grüße nils</p>
<p>PS: Vielleicht kennt noch jemand ein nicht zu kompliziertes Tutorial <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/162801/probleme-mit-zeigern</link><generator>RSS for Node</generator><lastBuildDate>Sat, 12 Sep 2026 16:53:34 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/162801.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Oct 2006 13:06:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Probleme mit Zeigern on Mon, 23 Oct 2006 13:06:58 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>mal wieder eine Anfängerfrage, aber mit den ganzen Zeigern hab ich noch ein kleines Problem. Ich habe folgenden Funktion:</p>
<pre><code class="language-cpp">bool usbInterface::read( BYTE* output[261] )
{
	unsigned long	BytesRead; 
	BYTE            getstring[261];

	if ( connected )
	{
		ReadFile( DeviceHandle, getstring, 261, &amp;BytesRead, NULL ); 
		printf(&quot; \n ReadFile: 0x%X\n&quot;, getstring[261]);

		output = *getstring;
		return true;
	}
	return false;

}
</code></pre>
<p>und die will ich in main() ungefähr so aufrufen:</p>
<pre><code class="language-cpp">BYTE test[261];
myInterface.read( &amp;test );
</code></pre>
<p>so von der idee her müsste alles stimmen, nur bin ich mal wieder total mit den Zeigern durcheinander gekommen. kann mir da vll jemand helfen?</p>
<p>grüße nils</p>
<p>PS: Vielleicht kennt noch jemand ein nicht zu kompliziertes Tutorial <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1159547</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1159547</guid><dc:creator><![CDATA[Nils_Langner]]></dc:creator><pubDate>Mon, 23 Oct 2006 13:06:58 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Zeigern on Mon, 23 Oct 2006 13:22:52 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">BYTE test[261]; 
myInterface.read( test );
</code></pre>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1159559</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1159559</guid><dc:creator><![CDATA[freak11]]></dc:creator><pubDate>Mon, 23 Oct 2006 13:22:52 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Zeigern on Mon, 23 Oct 2006 13:31:54 GMT]]></title><description><![CDATA[<p>Danke, wie muss ich die dann als Prototyp definieren?</p>
<pre><code class="language-cpp">class usbInterface
{
	public:
		bool				read( BYTE* );
...
}
</code></pre>
<p>so bekomm ich nämlich wieder meine Fehler <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/1159570</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1159570</guid><dc:creator><![CDATA[Nils_Langner]]></dc:creator><pubDate>Mon, 23 Oct 2006 13:31:54 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Zeigern on Mon, 23 Oct 2006 13:34:21 GMT]]></title><description><![CDATA[<p>Die Funktion ist vollkommen daneben, auf mehreren Ebenen, die kommentier ich lieber nicht. Besser:</p>
<pre><code class="language-cpp">bool usbInterface::read( BYTE output[261] )
{
    unsigned long    BytesRead; //wozu ist das gut?

    if (connected)
    {
        ReadFile(DeviceHandle, output, 261, &amp;BytesRead, NULL);
//        printf(&quot; \n ReadFile: 0x%X\n&quot;, getstring[261]);
        return true;
    }
    return false;
}
// in main:
BYTE test[261];
myInterface.read(test);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1159573</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1159573</guid><dc:creator><![CDATA[Bashar]]></dc:creator><pubDate>Mon, 23 Oct 2006 13:34:21 GMT</pubDate></item><item><title><![CDATA[Reply to Probleme mit Zeigern on Mon, 23 Oct 2006 14:39:10 GMT]]></title><description><![CDATA[<p>Danke, hat geklappt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1159643</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1159643</guid><dc:creator><![CDATA[Nils_]]></dc:creator><pubDate>Mon, 23 Oct 2006 14:39:10 GMT</pubDate></item></channel></rss>