<?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[istream operator&amp;gt;&amp;gt;]]></title><description><![CDATA[<p>hallo</p>
<p>ich bin noch nicht so erfahren in c++, kenne aber ein paar basics.<br />
ich wollte für meine eigene klasse einen istream operator&gt;&gt; schreiben weil die syntax für den nutzer meiner klasse intuitiver ist. kleines code-beispiel:</p>
<pre><code>class foo
{
    //...
};
int main()
{
    foo instance;
    std::cin &gt;&gt; instance;
}
</code></pre>
<p>nun möchte ich ein verhalten erzeugen, bei welchem das programm so lange wartet, bis ein gewünschter delimitor (in diesem fall wahrscheinlich '\n') eingegeben wurde. wie geht das?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/319766/istream-operator-gt-gt</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Jul 2026 23:04:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/319766.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 02 Sep 2013 07:09:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to istream operator&amp;gt;&amp;gt; on Mon, 02 Sep 2013 07:09:02 GMT]]></title><description><![CDATA[<p>hallo</p>
<p>ich bin noch nicht so erfahren in c++, kenne aber ein paar basics.<br />
ich wollte für meine eigene klasse einen istream operator&gt;&gt; schreiben weil die syntax für den nutzer meiner klasse intuitiver ist. kleines code-beispiel:</p>
<pre><code>class foo
{
    //...
};
int main()
{
    foo instance;
    std::cin &gt;&gt; instance;
}
</code></pre>
<p>nun möchte ich ein verhalten erzeugen, bei welchem das programm so lange wartet, bis ein gewünschter delimitor (in diesem fall wahrscheinlich '\n') eingegeben wurde. wie geht das?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2349771</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2349771</guid><dc:creator><![CDATA[doktor banane]]></dc:creator><pubDate>Mon, 02 Sep 2013 07:09:02 GMT</pubDate></item><item><title><![CDATA[Reply to istream operator&amp;gt;&amp;gt; on Mon, 02 Sep 2013 07:28:36 GMT]]></title><description><![CDATA[<p>Vielleicht hilft dir das hier:</p>
<p><a href="http://www.c-plusplus.net/forum/319743" rel="nofollow">Klick</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2349775</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2349775</guid><dc:creator><![CDATA[Fuchs aus dem Wald]]></dc:creator><pubDate>Mon, 02 Sep 2013 07:28:36 GMT</pubDate></item><item><title><![CDATA[Reply to istream operator&amp;gt;&amp;gt; on Mon, 02 Sep 2013 07:43:35 GMT]]></title><description><![CDATA[<p>Was willst du denn eingeben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2349776</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2349776</guid><dc:creator><![CDATA[out]]></dc:creator><pubDate>Mon, 02 Sep 2013 07:43:35 GMT</pubDate></item><item><title><![CDATA[Reply to istream operator&amp;gt;&amp;gt; on Mon, 02 Sep 2013 07:51:02 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/15540">@Fuchs</a><br />
aus dem link werde ich iwie nicht schlau, sorry</p>
<p>@out<br />
eingegeben werden soll ein einfacher term wie z.b. &quot;2x^3+7&quot;, den ich dann innerhalb des operators interpretiere (ja, das bekomme ich hin, das ist nicht das problem). in der klasse werden dann die relevanten attribute des terms gespeichert. die idee ist es, dass der benutzer aufgefordert wird, einen term einzugeben, und dann - sobald er enter drückt - der term in die datenstruktur gepackt wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2349779</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2349779</guid><dc:creator><![CDATA[doktor banane]]></dc:creator><pubDate>Mon, 02 Sep 2013 07:51:02 GMT</pubDate></item><item><title><![CDATA[Reply to istream operator&amp;gt;&amp;gt; on Mon, 02 Sep 2013 07:54:18 GMT]]></title><description><![CDATA[<p>Was hast du denn selbst schon probiert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2349780</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2349780</guid><dc:creator><![CDATA[knivil]]></dc:creator><pubDate>Mon, 02 Sep 2013 07:54:18 GMT</pubDate></item><item><title><![CDATA[Reply to istream operator&amp;gt;&amp;gt; on Mon, 02 Sep 2013 08:06:33 GMT]]></title><description><![CDATA[<p>doktor banane schrieb:</p>
<blockquote>
<p>eingegeben werden soll ein einfacher term wie z.b. &quot;2x^3+7&quot;, den ich dann innerhalb des operators interpretiere (ja, das bekomme ich hin, das ist nicht das problem). in der klasse werden dann die relevanten attribute des terms gespeichert. die idee ist es, dass der benutzer aufgefordert wird, einen term einzugeben, und dann - sobald er enter drückt - der term in die datenstruktur gepackt wird.</p>
</blockquote>
<p>Guckst Du <a href="http://www.c-plusplus.net/forum/p1642138" rel="nofollow">hier</a>. Wenn Du bei Zeilenende aufhören willst, so kannst Du z.B. ein <code>std::noskipws</code> hinzufügen, dann hält das Lesen bei jedem White Character an (s. Zeile 126 im Listing und Kommentar darunter).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2349783</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2349783</guid><dc:creator><![CDATA[Werner Salomon]]></dc:creator><pubDate>Mon, 02 Sep 2013 08:06:33 GMT</pubDate></item><item><title><![CDATA[Reply to istream operator&amp;gt;&amp;gt; on Mon, 02 Sep 2013 09:40:06 GMT]]></title><description><![CDATA[<p>okay, nach umfangreichem rumprobieren hab ich das problem schlussendlich gelöst mithilfe von Werner Salomon's code. danke an alle</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2349809</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2349809</guid><dc:creator><![CDATA[doktor banane]]></dc:creator><pubDate>Mon, 02 Sep 2013 09:40:06 GMT</pubDate></item></channel></rss>