<?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[getline()]]></title><description><![CDATA[<p>Ich habe jetzt noch ein Problem! Ich habe ja schon einmal gefragt wie man ganze sätze in variablen speichert. und habe dann die getline() methode probiert. das funktioniert allerdings nicht.</p>
<pre><code class="language-cpp">cout&lt;&lt;&quot;\nPlease type in the name: &quot;;
getline(cin,txtname);
cout&lt;&lt;&quot;\nThe Name is: &quot;&lt;&lt;txtname&lt;&lt;&quot;Do you want to edit? (y=Yes/n=No) &quot;;
cin&gt;&gt;txtnameyn;
if(txtnameyn==no)
{
cout&lt;&lt;&quot;\nPlease type in the text: &quot;;
getline(cin,txttext);
cout&lt;&lt;&quot;The Text is: &quot;&lt;&lt;txttext&lt;&lt;&quot; And the Name is: &quot;&lt;&lt;txtname&lt;&lt;&quot;Do you want to Edit? (y=Yes/n=No) &quot;;
cin&gt;&gt;txtnameyn;
if(txtnameyn==no)
{
fstream f;
filename&lt;&lt;&quot;Test-&quot;&lt;&lt;txtname&lt;&lt;&quot;.txt&quot;;
f.open(filename.str().c_str(), ios::out);
f&lt;&lt;txtname&lt;&lt;&quot;\n\n&quot;&lt;&lt;txttext&lt;&lt;endl;
f.close();
f.open(&quot;all.mea&quot;, ios::out|ios::app);
f&lt;&lt;&quot;mea-&quot;&lt;&lt;txtname&lt;&lt;&quot;.txt&quot;&lt;&lt;endl;
f.close();
cout&lt;&lt;&quot;Everythings done!&quot;;
}
else
{
cout&lt;&lt;&quot;\nNot available yet!\n&quot;;
}
}
else
{
cout&lt;&lt;&quot;\nNot available yet!\n&quot;;
}
</code></pre>
<p>Mein Problem ist jetzt, das man weder den Namen (txtname), noch den text (txttext) eingeben kann, da diese punkte zwar angezeigt, jedoch nicht ausfüllbar sind, da direkt der nächste punkt angezeigt wird!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/228558/getline</link><generator>RSS for Node</generator><lastBuildDate>Mon, 28 Sep 2026 11:58:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/228558.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 29 Nov 2008 21:57:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to getline() on Sat, 29 Nov 2008 21:57:15 GMT]]></title><description><![CDATA[<p>Ich habe jetzt noch ein Problem! Ich habe ja schon einmal gefragt wie man ganze sätze in variablen speichert. und habe dann die getline() methode probiert. das funktioniert allerdings nicht.</p>
<pre><code class="language-cpp">cout&lt;&lt;&quot;\nPlease type in the name: &quot;;
getline(cin,txtname);
cout&lt;&lt;&quot;\nThe Name is: &quot;&lt;&lt;txtname&lt;&lt;&quot;Do you want to edit? (y=Yes/n=No) &quot;;
cin&gt;&gt;txtnameyn;
if(txtnameyn==no)
{
cout&lt;&lt;&quot;\nPlease type in the text: &quot;;
getline(cin,txttext);
cout&lt;&lt;&quot;The Text is: &quot;&lt;&lt;txttext&lt;&lt;&quot; And the Name is: &quot;&lt;&lt;txtname&lt;&lt;&quot;Do you want to Edit? (y=Yes/n=No) &quot;;
cin&gt;&gt;txtnameyn;
if(txtnameyn==no)
{
fstream f;
filename&lt;&lt;&quot;Test-&quot;&lt;&lt;txtname&lt;&lt;&quot;.txt&quot;;
f.open(filename.str().c_str(), ios::out);
f&lt;&lt;txtname&lt;&lt;&quot;\n\n&quot;&lt;&lt;txttext&lt;&lt;endl;
f.close();
f.open(&quot;all.mea&quot;, ios::out|ios::app);
f&lt;&lt;&quot;mea-&quot;&lt;&lt;txtname&lt;&lt;&quot;.txt&quot;&lt;&lt;endl;
f.close();
cout&lt;&lt;&quot;Everythings done!&quot;;
}
else
{
cout&lt;&lt;&quot;\nNot available yet!\n&quot;;
}
}
else
{
cout&lt;&lt;&quot;\nNot available yet!\n&quot;;
}
</code></pre>
<p>Mein Problem ist jetzt, das man weder den Namen (txtname), noch den text (txttext) eingeben kann, da diese punkte zwar angezeigt, jedoch nicht ausfüllbar sind, da direkt der nächste punkt angezeigt wird!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1623084</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1623084</guid><dc:creator><![CDATA[Blake_MaX156]]></dc:creator><pubDate>Sat, 29 Nov 2008 21:57:15 GMT</pubDate></item><item><title><![CDATA[Reply to getline() on Sun, 30 Nov 2008 01:29:57 GMT]]></title><description><![CDATA[<p>Rück deinen Code anständig ein!</p>
<pre><code class="language-cpp">if(txtnameyn==no)
</code></pre>
<p>Dir ist schon klar, dass kein char, oder string verglichen wird, oder?</p>
<p>Und probier deine Frage ein wenig exakter zu formulieren..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1623158</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1623158</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Sun, 30 Nov 2008 01:29:57 GMT</pubDate></item></channel></rss>