<?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[printf erweitern für eigene Datentypen]]></title><description><![CDATA[<p>Moinmoin,</p>
<p>ich würd gern die printf erweitern, damit man auch eigene Datentypen ausgeben kann: z.B.</p>
<pre><code class="language-cpp">typedef struct NAME
{
   CString Vorname;
   CString Nachname;
} name;
name.Vorname = &quot;Harald&quot;;
name.Nachname = &quot;Weber&quot;;

myprintf(&quot;Vorname=%V Nachname=%N&quot;, name, name);
</code></pre>
<p>irgendwie so hab ich angefangen:</p>
<pre><code class="language-cpp">int myprintf(char* pcFormat, ...)
{

}
</code></pre>
<p>und jetzt häng ich fest... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/188159/printf-erweitern-für-eigene-datentypen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 25 Sep 2026 01:09:30 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/188159.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 27 Jul 2007 10:52:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to printf erweitern für eigene Datentypen on Fri, 27 Jul 2007 10:52:12 GMT]]></title><description><![CDATA[<p>Moinmoin,</p>
<p>ich würd gern die printf erweitern, damit man auch eigene Datentypen ausgeben kann: z.B.</p>
<pre><code class="language-cpp">typedef struct NAME
{
   CString Vorname;
   CString Nachname;
} name;
name.Vorname = &quot;Harald&quot;;
name.Nachname = &quot;Weber&quot;;

myprintf(&quot;Vorname=%V Nachname=%N&quot;, name, name);
</code></pre>
<p>irgendwie so hab ich angefangen:</p>
<pre><code class="language-cpp">int myprintf(char* pcFormat, ...)
{

}
</code></pre>
<p>und jetzt häng ich fest... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1333857</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1333857</guid><dc:creator><![CDATA[my_printf]]></dc:creator><pubDate>Fri, 27 Jul 2007 10:52:12 GMT</pubDate></item><item><title><![CDATA[Reply to printf erweitern für eigene Datentypen on Fri, 27 Jul 2007 10:55:55 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Das geht nur indem du selber den String parst und nach deinen Symbolen suchst.</p>
<p>Verwendet lieber std::streams und überlade den Operator &lt;&lt; für dein struct.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1333868</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1333868</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Fri, 27 Jul 2007 10:55:55 GMT</pubDate></item><item><title><![CDATA[Reply to printf erweitern für eigene Datentypen on Fri, 27 Jul 2007 10:58:18 GMT]]></title><description><![CDATA[<p>Da NAME kein POD mehr ist, wirst Du sowieso spätestens bei der Übergabe eines NAME über die Ellipse scheitern. Mach was akari vorgeschlagen hat, Streams haben dieses Problem nicht (neben vielen anderen).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1333870</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1333870</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Fri, 27 Jul 2007 10:58:18 GMT</pubDate></item></channel></rss>