<?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[osstringstream mit binären Daten]]></title><description><![CDATA[<p>Hallo zusammen!</p>
<p>Gibt es eine Möglichkeit in einen osstringstream mit dem &lt;&lt;-Operator binäre Daten zu schreiben?</p>
<pre><code class="language-cpp">osstringstream oss;

oss &lt;&lt; 0; // Inhalt = 0x0 und nicht 0x30
</code></pre>
<p>Gruß &amp;&amp; Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/182979/osstringstream-mit-binären-daten</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 01:58:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/182979.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 31 May 2007 10:05:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to osstringstream mit binären Daten on Thu, 31 May 2007 10:05:45 GMT]]></title><description><![CDATA[<p>Hallo zusammen!</p>
<p>Gibt es eine Möglichkeit in einen osstringstream mit dem &lt;&lt;-Operator binäre Daten zu schreiben?</p>
<pre><code class="language-cpp">osstringstream oss;

oss &lt;&lt; 0; // Inhalt = 0x0 und nicht 0x30
</code></pre>
<p>Gruß &amp;&amp; Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1295792</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1295792</guid><dc:creator><![CDATA[-=Lucifer=-]]></dc:creator><pubDate>Thu, 31 May 2007 10:05:45 GMT</pubDate></item><item><title><![CDATA[Reply to osstringstream mit binären Daten on Thu, 31 May 2007 10:07:17 GMT]]></title><description><![CDATA[<p>Soll natürlich ostringstream anstatt osstringstream sein...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1295793</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1295793</guid><dc:creator><![CDATA[-=Lucifer=-]]></dc:creator><pubDate>Thu, 31 May 2007 10:07:17 GMT</pubDate></item><item><title><![CDATA[Reply to osstringstream mit binären Daten on Thu, 31 May 2007 10:12:57 GMT]]></title><description><![CDATA[<p>-=Lucifer=- schrieb:</p>
<blockquote>
<p>Hallo zusammen!</p>
<p>Gibt es eine Möglichkeit in einen osstringstream mit dem &lt;&lt;-Operator binäre Daten zu schreiben?</p>
</blockquote>
<p>Nein. Davon abgesehen das der o<strong>string</strong>stream ohnehinn für Zeichenketten konzipiert ist, formatiert der Operator&lt;&lt; den Übergebenen Wert und schreibt ebenfalls einen String in den Stream.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1295795</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1295795</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Thu, 31 May 2007 10:12:57 GMT</pubDate></item><item><title><![CDATA[Reply to osstringstream mit binären Daten on Thu, 31 May 2007 10:17:00 GMT]]></title><description><![CDATA[<p>Gibt es eine andere Möglichkeit so etwas zu realisieren? Vielleicht so eine Art BinaryWriter (.Net)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1295797</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1295797</guid><dc:creator><![CDATA[-=Lucifer=-]]></dc:creator><pubDate>Thu, 31 May 2007 10:17:00 GMT</pubDate></item><item><title><![CDATA[Reply to osstringstream mit binären Daten on Thu, 31 May 2007 10:31:57 GMT]]></title><description><![CDATA[<p>Um Binärdaten in einen Stream zu schreiben verwendet man im Normalfall die Methode write().</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1295803</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1295803</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Thu, 31 May 2007 10:31:57 GMT</pubDate></item><item><title><![CDATA[Reply to osstringstream mit binären Daten on Thu, 31 May 2007 10:35:07 GMT]]></title><description><![CDATA[<p>Warum willst du binäre Daten in einem String haben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1295806</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1295806</guid><dc:creator><![CDATA[Helium]]></dc:creator><pubDate>Thu, 31 May 2007 10:35:07 GMT</pubDate></item><item><title><![CDATA[Reply to osstringstream mit binären Daten on Thu, 31 May 2007 10:56:40 GMT]]></title><description><![CDATA[<p>Ich will nicht unbedingt in einen String schreiben. Ich wollte mit dem &lt;&lt;-Op. in einen Stream schreiben und diesen dann über Netzwerk verschicken. Ich könnte das auch mit write machen, aber mit &lt;&lt; ist's halt bequemer :D.</p>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1295819</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1295819</guid><dc:creator><![CDATA[-=Lucifer=-]]></dc:creator><pubDate>Thu, 31 May 2007 10:56:40 GMT</pubDate></item><item><title><![CDATA[Reply to osstringstream mit binären Daten on Thu, 31 May 2007 11:12:28 GMT]]></title><description><![CDATA[<p>Hallo,<br />
mach doch einfach eine Klasse BinaryStream. Ein interface BinaryStreamOperandIF und definiere einen operator &lt;&lt;</p>
<p>Kleines Freihandbesipiel:</p>
<pre><code class="language-cpp">struct BinaryStreamOperandIF
{
   bool GetBinaryData(void*&amp; data, size_t length) = 0;
};

class BinaryStream
{
public: 
   void write(void*, size_t) {....}   
};

BinaryStream&amp; operator&lt;&lt; (BinaryStream&amp; stream, BinaryStreamOperandIF op)
{
   op.GetBinaryData(...);
   stream.wrtie(...);
   return stream;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1295826</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1295826</guid><dc:creator><![CDATA[templäd]]></dc:creator><pubDate>Thu, 31 May 2007 11:12:28 GMT</pubDate></item><item><title><![CDATA[Reply to osstringstream mit binären Daten on Thu, 31 May 2007 11:33:38 GMT]]></title><description><![CDATA[<p>Danke! Bin gerade dabei <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1295840</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1295840</guid><dc:creator><![CDATA[-=Lucifer=-]]></dc:creator><pubDate>Thu, 31 May 2007 11:33:38 GMT</pubDate></item></channel></rss>