<?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[string statt char *]]></title><description><![CDATA[<p>hi,</p>
<p>hab da nen c-code und wollte fragen wie der in c++ aussehen würde, da man in c++ ja glaub die <strong>string-klasse</strong> statt **char *** benutzt</p>
<pre><code class="language-cpp">...

  unsigned char *buffer = 0;

    buffer = (unsigned char*)malloc(BUFFERSIZE);

    my_iphdr = (struct ip*)buffer;
    ...

    my_icmp  = (struct icmp*)(buffer + sizeof(struct ip));
    ...

  free(buffer);
</code></pre>
<p>mfg blan</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/137654/string-statt-char</link><generator>RSS for Node</generator><lastBuildDate>Sat, 29 Aug 2026 19:40:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/137654.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 19 Feb 2006 15:30:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to string statt char * on Sun, 19 Feb 2006 15:30:28 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>hab da nen c-code und wollte fragen wie der in c++ aussehen würde, da man in c++ ja glaub die <strong>string-klasse</strong> statt **char *** benutzt</p>
<pre><code class="language-cpp">...

  unsigned char *buffer = 0;

    buffer = (unsigned char*)malloc(BUFFERSIZE);

    my_iphdr = (struct ip*)buffer;
    ...

    my_icmp  = (struct icmp*)(buffer + sizeof(struct ip));
    ...

  free(buffer);
</code></pre>
<p>mfg blan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/997918</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997918</guid><dc:creator><![CDATA[blan]]></dc:creator><pubDate>Sun, 19 Feb 2006 15:30:28 GMT</pubDate></item><item><title><![CDATA[Reply to string statt char * on Sun, 19 Feb 2006 15:33:20 GMT]]></title><description><![CDATA[<p>du machst das genau richtig, denn eine stringklasse hilft dir bei raw sockets eher weniger...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/997920</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997920</guid><dc:creator><![CDATA[c.rackwitz]]></dc:creator><pubDate>Sun, 19 Feb 2006 15:33:20 GMT</pubDate></item><item><title><![CDATA[Reply to string statt char * on Sun, 19 Feb 2006 15:37:39 GMT]]></title><description><![CDATA[<p>In C++ könntest du aber schon malloc/free durch new([])/delete([]) ersetzen. <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/997929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997929</guid><dc:creator><![CDATA[Redhead]]></dc:creator><pubDate>Sun, 19 Feb 2006 15:37:39 GMT</pubDate></item><item><title><![CDATA[Reply to string statt char * on Sun, 19 Feb 2006 15:57:57 GMT]]></title><description><![CDATA[<p>okay, dann ist ja alles super - danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>mfg blan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/997941</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/997941</guid><dc:creator><![CDATA[blan]]></dc:creator><pubDate>Sun, 19 Feb 2006 15:57:57 GMT</pubDate></item></channel></rss>