<?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[STL map mit Typ &amp;quot;variant&amp;quot;?]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>habe ein Brett vor dem Kopf:</p>
<p>Nachdem mein Programm verschiedene Ergebnisse berechnet hat, sollen diese in Tabellenform ausgegeben werden. Das ganze muss variabel bleiben, so dass der Anwendender wählen kann, was er genau für Ergebnisse sehen will.</p>
<p>Im einfachsten Fall würde ich die Ergebnisse nach Kategorien ordnen:</p>
<pre><code class="language-cpp">map&lt;string, pair&lt;string, string&gt; &gt; ergebnismap;
//Ergebnismap fuellen
ergebnismap[&quot;Allgemein&quot;]=make_pair(&quot;Parameter1&quot;, &quot;Wert1&quot;);
</code></pre>
<p>Nun kann aber &quot;Wert1&quot; sowohl string als auch double als auch int sein. Soll ich alles als string speichern? Eigentlich hätte ich an der stelle gerne eine Templateimplementation aber map&lt;string, pair&lt;string, T&gt; &gt; tut´s ja auch nicht.</p>
<p>Danke für eure Tipps!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/279593/stl-map-mit-typ-quot-variant-quot</link><generator>RSS for Node</generator><lastBuildDate>Mon, 24 Aug 2026 14:13:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/279593.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 30 Dec 2010 07:26:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to STL map mit Typ &amp;quot;variant&amp;quot;? on Thu, 30 Dec 2010 07:26:51 GMT]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>habe ein Brett vor dem Kopf:</p>
<p>Nachdem mein Programm verschiedene Ergebnisse berechnet hat, sollen diese in Tabellenform ausgegeben werden. Das ganze muss variabel bleiben, so dass der Anwendender wählen kann, was er genau für Ergebnisse sehen will.</p>
<p>Im einfachsten Fall würde ich die Ergebnisse nach Kategorien ordnen:</p>
<pre><code class="language-cpp">map&lt;string, pair&lt;string, string&gt; &gt; ergebnismap;
//Ergebnismap fuellen
ergebnismap[&quot;Allgemein&quot;]=make_pair(&quot;Parameter1&quot;, &quot;Wert1&quot;);
</code></pre>
<p>Nun kann aber &quot;Wert1&quot; sowohl string als auch double als auch int sein. Soll ich alles als string speichern? Eigentlich hätte ich an der stelle gerne eine Templateimplementation aber map&lt;string, pair&lt;string, T&gt; &gt; tut´s ja auch nicht.</p>
<p>Danke für eure Tipps!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2000235</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2000235</guid><dc:creator><![CDATA[KeineAhnung78]]></dc:creator><pubDate>Thu, 30 Dec 2010 07:26:51 GMT</pubDate></item><item><title><![CDATA[Reply to STL map mit Typ &amp;quot;variant&amp;quot;? on Thu, 30 Dec 2010 07:41:28 GMT]]></title><description><![CDATA[<p>Hoppla, pardon...das Thema gibt´s schon häufiger hier *schäm*.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2000236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2000236</guid><dc:creator><![CDATA[KeineAhnung78]]></dc:creator><pubDate>Thu, 30 Dec 2010 07:41:28 GMT</pubDate></item><item><title><![CDATA[Reply to STL map mit Typ &amp;quot;variant&amp;quot;? on Thu, 30 Dec 2010 07:41:48 GMT]]></title><description><![CDATA[<p>Wenn du am Ende sowieso nur eine Tabelle in Textform anzeigst, kannst du es gleich als String speichern, ansonsten boost variant oder ähnliches.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2000237</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2000237</guid><dc:creator><![CDATA[mmmmmk]]></dc:creator><pubDate>Thu, 30 Dec 2010 07:41:48 GMT</pubDate></item></channel></rss>