<?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[cout mit iterator]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>folgendes</p>
<pre><code>char ins='#';
	 std::string::iterator it;
	 found=input.find_first_of(&quot;ae&quot;, 0);

	 if(found){
	 	while(found != input.npos){ 	 		
	 		it=input.begin()+(found+1);	 	// Nach gefunden einfügen	
	 		input.insert(it, ins);
	 		found=input.find_first_of(&quot;ae&quot;, found+1);
		    std::cout&lt;&lt;it; // Geht nicht, Compiler motzt
            std::cout&lt;&lt;*it  // Compiler OK, zeigt aber nichts an	

		}
	}

	 std::cout&lt;&lt;input;
</code></pre>
<p>Wie kann ich mir den Iterator anzeigen lassen, bzw. wo wir gerade &quot;stehen&quot;?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/327827/cout-mit-iterator</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Jul 2026 16:45:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/327827.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 06 Sep 2014 11:08:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to cout mit iterator on Sat, 06 Sep 2014 11:08:45 GMT]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>folgendes</p>
<pre><code>char ins='#';
	 std::string::iterator it;
	 found=input.find_first_of(&quot;ae&quot;, 0);

	 if(found){
	 	while(found != input.npos){ 	 		
	 		it=input.begin()+(found+1);	 	// Nach gefunden einfügen	
	 		input.insert(it, ins);
	 		found=input.find_first_of(&quot;ae&quot;, found+1);
		    std::cout&lt;&lt;it; // Geht nicht, Compiler motzt
            std::cout&lt;&lt;*it  // Compiler OK, zeigt aber nichts an	

		}
	}

	 std::cout&lt;&lt;input;
</code></pre>
<p>Wie kann ich mir den Iterator anzeigen lassen, bzw. wo wir gerade &quot;stehen&quot;?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2416336</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2416336</guid><dc:creator><![CDATA[it_prob]]></dc:creator><pubDate>Sat, 06 Sep 2014 11:08:45 GMT</pubDate></item><item><title><![CDATA[Reply to cout mit iterator on Sat, 06 Sep 2014 11:13:16 GMT]]></title><description><![CDATA[<p>f...k</p>
<p>Habe es jetzt mit std::cout&lt;&lt;(*it) hinbekommen. Habe nicht gesehen das iterator scheinbar auf char bezogen ist.<br />
Wollte eigentlich die Position angezeigt bekommen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2416337</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2416337</guid><dc:creator><![CDATA[it_prob]]></dc:creator><pubDate>Sat, 06 Sep 2014 11:13:16 GMT</pubDate></item><item><title><![CDATA[Reply to cout mit iterator on Sat, 06 Sep 2014 11:55:45 GMT]]></title><description><![CDATA[<pre><code>std::cout &lt;&lt; it - input.begin();
</code></pre>
<p>?</p>
<blockquote>
<p>Habe es jetzt mit std::cout&lt;&lt;(*it) hinbekommen.</p>
</blockquote>
<p>Es macht keinen semantischen Unterschied ob du</p>
<pre><code>cout &lt;&lt; *it;
</code></pre>
<p>oder</p>
<pre><code>cout &lt;&lt; (*it);
</code></pre>
<p>schreibst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2416341</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2416341</guid><dc:creator><![CDATA[Columbo]]></dc:creator><pubDate>Sat, 06 Sep 2014 11:55:45 GMT</pubDate></item></channel></rss>