<?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[map-aufruf in map]]></title><description><![CDATA[<p>Hallo, kann man sowas machen?</p>
<pre><code>for(map&lt;int, int&gt;::const_iterator itr(m.begin()); itr != m.end(); ++itr)
        cout &lt;&lt; &quot;TeilerSumme &quot; &lt;&lt; itr-&gt;first &lt;&lt; &quot; Vorkommen bei &quot; &lt;&lt; itr-&gt;second 

       &lt;&lt; for(map&lt;int, int&gt;::const_iterator itr(m.begin()); itr != m.end(); ++itr)
          cout&lt;&lt; 
             if (first1 == first2)
                  {
                  cout&lt;&lt;&quot; &quot;&lt;&lt;itr-&gt;second;
                  };
endl;
</code></pre>
<p>Ich weiß nicht, ob er im if das first vom 1. for mit dem first vom 2. for vergleicht, was das Ziel ist.... jedenfalls ist mir das in der Nacht eingefallen. For's kann man ja schachteln .. unendlich .... aber in Integratoren?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/321188/map-aufruf-in-map</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 13:15:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/321188.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 27 Oct 2013 08:05:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to map-aufruf in map on Sun, 27 Oct 2013 08:44:43 GMT]]></title><description><![CDATA[<p>Hallo, kann man sowas machen?</p>
<pre><code>for(map&lt;int, int&gt;::const_iterator itr(m.begin()); itr != m.end(); ++itr)
        cout &lt;&lt; &quot;TeilerSumme &quot; &lt;&lt; itr-&gt;first &lt;&lt; &quot; Vorkommen bei &quot; &lt;&lt; itr-&gt;second 

       &lt;&lt; for(map&lt;int, int&gt;::const_iterator itr(m.begin()); itr != m.end(); ++itr)
          cout&lt;&lt; 
             if (first1 == first2)
                  {
                  cout&lt;&lt;&quot; &quot;&lt;&lt;itr-&gt;second;
                  };
endl;
</code></pre>
<p>Ich weiß nicht, ob er im if das first vom 1. for mit dem first vom 2. for vergleicht, was das Ziel ist.... jedenfalls ist mir das in der Nacht eingefallen. For's kann man ja schachteln .. unendlich .... aber in Integratoren?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2363240</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2363240</guid><dc:creator><![CDATA[brak]]></dc:creator><pubDate>Sun, 27 Oct 2013 08:44:43 GMT</pubDate></item><item><title><![CDATA[Reply to map-aufruf in map on Sun, 27 Oct 2013 08:34:43 GMT]]></title><description><![CDATA[<p>Der ganze Code wirkt recht wirr. Was willst du denn überhaupt bezwecken?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2363244</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2363244</guid><dc:creator><![CDATA[Marthog]]></dc:creator><pubDate>Sun, 27 Oct 2013 08:34:43 GMT</pubDate></item><item><title><![CDATA[Reply to map-aufruf in map on Sun, 27 Oct 2013 08:36:57 GMT]]></title><description><![CDATA[<p>Kompiliert das?<br />
Nein.<br />
Kann man das also machen? Nein.</p>
<p>Ergibt das irgendeinen Sinn? Schwer zu sagen.</p>
<p>Du hast doch schon programmiert? Dann weisst Du, dass Du Struktur<br />
a)in Deine Gedanken und<br />
b)in Deinen Code bekommen musst.<br />
Das fehlt doch noch komplett.</p>
<p>Gestern habe ich Dich in <a href="http://www.c-plusplus.net/forum/321171" rel="nofollow">einem</a> Deiner zahlreichen anderen Threads aufgefordert Struktur in Dein Programm zu bringen. Den absolut unzureichenden Spaghetticode, den Du da gezeigt hast faß ich nämlich mit der Beißzange nicht an.</p>
<p>Zeig doch mal, was in der Richtung passiert ist, anstatt weiter zu frickeln. Das wäre nämlich viel wichtiger als &quot;map-aufruf in map&quot;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2363246</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2363246</guid><dc:creator><![CDATA[Furble Wurble]]></dc:creator><pubDate>Sun, 27 Oct 2013 08:36:57 GMT</pubDate></item><item><title><![CDATA[Reply to map-aufruf in map on Sun, 27 Oct 2013 08:45:39 GMT]]></title><description><![CDATA[<p>Marthog schrieb:</p>
<blockquote>
<p>Der ganze Code wirkt recht wirr. Was willst du denn überhaupt bezwecken?</p>
</blockquote>
<p>also, es liegt eine map vor in der es mehrmals dieselben first-Werte gibt.</p>
<p>Ich will jetzt daß er nach jedem first, all die seconds ausgibt, die zu demselben first bestehen...,</p>
<p>Weiß eber nicht, <strong>bez. vermute</strong>, daß das so nicht klappt, weil ich vermute, er kann die first's nicht zuordnen. Ob ich einfach mal ein auto dazwischen schreib, daß er es automatisch macht? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2363247</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2363247</guid><dc:creator><![CDATA[brak]]></dc:creator><pubDate>Sun, 27 Oct 2013 08:45:39 GMT</pubDate></item><item><title><![CDATA[Reply to map-aufruf in map on Sun, 27 Oct 2013 08:50:31 GMT]]></title><description><![CDATA[<p>Furble Wurble schrieb:</p>
<blockquote>
<p>Gestern habe ich Dich in <a href="http://www.c-plusplus.net/forum/321171" rel="nofollow">einem</a> Deiner zahlreichen anderen Threads aufgefordert <strong>Struktur</strong> in Dein Programm zu bringen. Den absolut unzureichenden Spaghetticode, den Du da gezeigt hast faß ich nämlich mit der Beißzange nicht an.</p>
</blockquote>
<p>weiß gar nicht, was Strukrur ist, ich kenn den Befehl nicht ... hab ihn auch nicht gefunden beim Googeln oder meinst Du Ohrnung?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2363248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2363248</guid><dc:creator><![CDATA[brak]]></dc:creator><pubDate>Sun, 27 Oct 2013 08:50:31 GMT</pubDate></item><item><title><![CDATA[Reply to map-aufruf in map on Sun, 27 Oct 2013 09:21:43 GMT]]></title><description><![CDATA[<p>brak schrieb:</p>
<blockquote>
<p>Furble Wurble schrieb:</p>
<blockquote>
<p>Gestern habe ich Dich in <a href="http://www.c-plusplus.net/forum/321171" rel="nofollow">einem</a> Deiner zahlreichen anderen Threads aufgefordert <strong>Struktur</strong> in Dein Programm zu bringen. Den absolut unzureichenden Spaghetticode, den Du da gezeigt hast faß ich nämlich mit der Beißzange nicht an.</p>
</blockquote>
<p>weiß gar nicht, was Strukrur ist, ich kenn den Befehl nicht ... hab ihn auch nicht gefunden beim Googeln oder meinst Du Ohrnung?</p>
</blockquote>
<p>Damit spielt er auf einen Kampfbegriff aus den 70-er Jahren an.<br />
<a href="http://de.wikipedia.org/wiki/Strukturierte_Programmierung" rel="nofollow">http://de.wikipedia.org/wiki/Strukturierte_Programmierung</a><br />
Siehe auch <a href="http://de.wikipedia.org/wiki/Spaghetticode" rel="nofollow">http://de.wikipedia.org/wiki/Spaghetticode</a></p>
<p>Tatsächlich besteht die Gefahr des Spaghetticodes gar nicht mehr und modernes C++ widerspricht teilweise der Strukturierten Programmierung.</p>
<p>Ja, Du solltest echt mehr Ohrnung in Deinen Code bringen. Und vor allem vorher in den Plan.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2363255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2363255</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sun, 27 Oct 2013 09:21:43 GMT</pubDate></item><item><title><![CDATA[Reply to map-aufruf in map on Sun, 27 Oct 2013 09:27:19 GMT]]></title><description><![CDATA[<p>Ja, er meint Ordnung. Struktur könnte man auf das struct zurüclführen und das gibt es sehr wohl in C und auch C++.</p>
<p>Nein, er meint, dass du dein Programmcode mal aufräumen sollst, du sollst ihn lesbar machen.</p>
<p>Was ist einfacher zu lesen/verstehen, und was sieht rein optisch schöner aus?</p>
<pre><code>#define o(a,b,c,d) a##f b##f c##f d; a##g b##g c##g d;q--
#define Z(z)if(*j==z)
#define c(z,p) Z(z){y;v p##=r;o(b,[q-1]=b,[q] p b,[q]);}
#define y q+=t;t=0
#define r w[q]
#define v w[q-1]
#define w(a,m,f) Z(a){y;r=m(r);q++;o(b,[q-1] = -b,[q-1]*f(r)+0*b,[0]);}
#define A(p,w,o) for(p=0;p&lt;w;p++)_(o)
#define P(a) for(a=Z;a&lt;Z;a++)
#define _ putchar
typedef double o;
typedef char z;
o A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y, E_, w[20], bf[20], bg[20],x=-1.3/8,p,d,l=0,h=4e-3,f,m;
z e[17] = &quot;FKE&lt;&lt;gMAQUDIYO9\&quot;=&quot;, *k, *j; o g(o p, o d){int q =-1,t=0;j=k;while( *j ){c(45,-);Z(100){y;q++;r=v;q[bf]=bf[q-1];q[bg]=bg[q-1];}Z(42)
     {y;v*=r;o(b,[q-1]=r*b,[q-1] + v*b,[q]);}Z(44){t=0;q++;}Z(116){f=v;v=r;r=f;f=bf[q];q[bf]=bf[q-1];bf[q-1]=f;f=q[bg];bg[q]=(q-1)[bg];bg[q-1]=f;

      }c(43,+);Z(47){y;v/=r;              o(b,[q-1]=b,[q-1]/r-v/                (r*r)*b,[q]);}Z(121){y;q++                        ;r=d; bf[ q]=0;bg[q]=1;}
      Z(94){y;f=v;v=pow(v,r)              ;o(b,[q-1]=r*b,[q-1]*                 pow(f,r-1)+0*b,[q]);}w(115                        ,sin,cos);w(99,cos,sin);
      Z(120){y;q++;r=p;bf[q]              =1;bg[q]=0;}if(*j&gt;=48                 &amp;&amp;*j&lt;58){q++;t=1;r=*j-48 ;                        bf[q] = 0;(q--)[bg] = 0;
                             }j++;}H=bf[0]                                                                ;K= bg[ 0]; return w[0];}
                             void s(){int                                                                 e=0;X=Q*8;f=g (Y*8, L*8 )
                             ;e=(f-X&lt;0)?1:                                                                -1;l=0;while((l+=h)&lt;8)  {
      V=Y*8+l*R;W=L* 8+l*D;X=             Q*8+l*U;f=g(V,W);if((f                                          -X)*e&gt;0){if(V&gt;-1&amp;&amp;V&lt;1&amp;&amp;W&gt;                   
      -1&amp;&amp;W&lt;1){p=V;d=W;return            ;}else e/=-1;}}p=d=-10                                           ;}int main(int argc, z **
      argv){int c, f;z b[2],Z            ;S=0,C=1;k=argv[1];Z =                                           atoi(argv[2])&gt;&gt;1;b[1]=Z*2

      &amp;255;b[0]=Z&gt;&gt; 9;J= 3.1415/Z;A(f,6,f[e]^f+1);while(--f&gt;1)_(
      (f%2)[b]);_(246);A(c,384,c/3%2?c/6&lt;&lt;2:0);_(_(0));_(_((_(33)
      &lt;&lt;3)-9)/23);for(f+=5;f &lt; c/22 ; f++) _(e[f] ^ f - 3);for(;f
                                           &gt; c/29;f--)_(f&gt;15?2*f-
                                           31:c);_(0);for(f=0;f&lt;=
                                           Z*2 ; f++){N = S;E_=1-
                        J*J/2;T=J*(1-J*J/6);
                        S=S*E_+C*T;C=C*E_-N*
                        T;A=-(C*C-S*S);P=-A*
     C;E=A*S;G=S*C*2;I=-
     G*S;F=G*C;_((_(e[10
     ]/2-1)&lt;&lt;3)-18);for(
     c=-1;c&lt;5;c++)_((c+1)%2?0:-2*c*c+3*c+9);_(44);A(c,9,c&amp;4?(1-c%2
     )[b]:0);_(7);for(B=-Z ; B&lt;Z ; B++){_(Z+2);for(O=-Z;O&lt;Z;O++){Y
     = (E - P*B/Z - G*O/Z)*x;L = (I - F*B/Z - A*O/Z)*x;Q = (-C +S*

     B/Z)*x;R = - Y + E; D =-L+I; U =-Q-C;s();3[w] = sqrt(R*R + D*D + U*U);m=p==-10?1:(4[w]=sqrt(H*H+K*K+1)*w[3],H/=-4[w],K/=-4[w],
     fabs(H*R + K*D + U/4[w])*exp(-l*l/2) );_((z)(m * 63)*2 + ((z)((p+1)*6) % 2 + (z)((d+1)*6) % 2 == 1 ? 1 : 0));O?l:(_(128),_(B!=
     Z-1 ? Z : Z+1));}_(128);}_(_(129)-129);}_(0x3b);}
</code></pre>
<p>(<a href="http://www.ioccc.org/2012/blakely/blakely.c" rel="nofollow">Quelle</a>)</p>
<p>oder das hier:</p>
<pre><code>// constructing maps
#include &lt;iostream&gt;
#include &lt;map&gt;

bool fncomp (char lhs, char rhs) {return lhs&lt;rhs;}

struct classcomp {
  bool operator() (const char&amp; lhs, const char&amp; rhs) const
  {return lhs&lt;rhs;}
};

int main ()
{
  std::map&lt;char,int&gt; first;

  first['a']=10;
  first['b']=30;
  first['c']=50;
  first['d']=70;

  std::map&lt;char,int&gt; second (first.begin(),first.end());

  std::map&lt;char,int&gt; third (second);

  std::map&lt;char,int,classcomp&gt; fourth;                 // class as Compare

  bool(*fn_pt)(char,char) = fncomp;
  std::map&lt;char,int,bool(*)(char,char)&gt; fifth (fn_pt); // function pointer as Compare

  return 0;
}
</code></pre>
<p>(<a href="http://www.cplusplus.com/reference/map/map/map/" rel="nofollow">Quelle</a>)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2363256</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2363256</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Sun, 27 Oct 2013 09:27:19 GMT</pubDate></item></channel></rss>