<?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[Kann man mit get gelesene Bytes an eine Funktion weiterleiten ?]]></title><description><![CDATA[<p>moin,</p>
<p>In Zeile 19 da lese ich ja die Bytes in buf ein.</p>
<p>Mein Problem ist jetzt aber wie kriege ich die Bytes in die Funktion ?</p>
<p>In der Funktion soll die test.exe erstellt werden mit den Bytes welche aus Zeile 19 gelesen wurden.</p>
<p>Hat wer eine ahnung wie das geht?</p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;
#include &lt;fstream.h&gt;
using namespace std;

void exec_notepad( char set_bytes[2] );

int main()
{

char buf[256];
ifstream file;

file.open(&quot;Notepad.exe&quot;,ios::binary);

    while ( file.get( buf[1] ) )
    {

      // gelesene bytes an funktion weiter geben und dort
      // in datei schreiben

    }
   file.close();

   exec_notepad ( );

return 0;
}

void exec_notepad(char *set_bytes )
{
 ofstream datei(&quot;test.exe&quot;,ios::binary);
 datei.put(*set_bytes);

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/248082/kann-man-mit-get-gelesene-bytes-an-eine-funktion-weiterleiten</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 07:07:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/248082.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 19 Aug 2009 13:31:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Kann man mit get gelesene Bytes an eine Funktion weiterleiten ? on Wed, 19 Aug 2009 13:31:56 GMT]]></title><description><![CDATA[<p>moin,</p>
<p>In Zeile 19 da lese ich ja die Bytes in buf ein.</p>
<p>Mein Problem ist jetzt aber wie kriege ich die Bytes in die Funktion ?</p>
<p>In der Funktion soll die test.exe erstellt werden mit den Bytes welche aus Zeile 19 gelesen wurden.</p>
<p>Hat wer eine ahnung wie das geht?</p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;
#include &lt;fstream.h&gt;
using namespace std;

void exec_notepad( char set_bytes[2] );

int main()
{

char buf[256];
ifstream file;

file.open(&quot;Notepad.exe&quot;,ios::binary);

    while ( file.get( buf[1] ) )
    {

      // gelesene bytes an funktion weiter geben und dort
      // in datei schreiben

    }
   file.close();

   exec_notepad ( );

return 0;
}

void exec_notepad(char *set_bytes )
{
 ofstream datei(&quot;test.exe&quot;,ios::binary);
 datei.put(*set_bytes);

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1763494</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763494</guid><dc:creator><![CDATA[funkt__ion]]></dc:creator><pubDate>Wed, 19 Aug 2009 13:31:56 GMT</pubDate></item><item><title><![CDATA[Reply to Kann man mit get gelesene Bytes an eine Funktion weiterleiten ? on Wed, 19 Aug 2009 13:37:14 GMT]]></title><description><![CDATA[<p><a href="http://www.cplusplus.com/reference/iostream/istream/get/" rel="nofollow"> <code>get</code> </a>und<a href="http://www.cplusplus.com/reference/iostream/ostream/put/" rel="nofollow"> <code>put</code> </a>sind für das Lesen oder Schreiben von jeweils einem Byte verantwortlich. Suchst du nicht eher sowas wie<a href="http://www.cplusplus.com/reference/iostream/istream/read/" rel="nofollow"> <code>read</code> </a>und<a href="http://www.cplusplus.com/reference/iostream/ostream/write/" rel="nofollow"> <code>write</code> </a>?</p>
<p>Wie man ein C Array an eine Funktion übergibt, solltest du ja eigentlich wissen, oder?</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1763500</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1763500</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Wed, 19 Aug 2009 13:37:14 GMT</pubDate></item></channel></rss>