<?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[cin innerhalb eigener Klasse]]></title><description><![CDATA[<p>Hallo zusammen,<br />
als Anfänger benötige ich eure Hilfe.<br />
Ich möchte ein Programm zur Heizungssteuerung schreiben. Das Programm digitemp liefert die Temperatur, system(&quot;digitemp -t0&quot;); gibt z.Bsp. 20.15 aus.<br />
class temperatur<br />
{<br />
int temp;</p>
<p>public:<br />
temperatur() : temp(0)<br />
{<br />
}</p>
<p>double vorlauf()<br />
{<br />
system(&quot;digitemp -t0&quot;);<br />
cin &gt;&gt; temp;<br />
//return temp;<br />
}<br />
};</p>
<p>Beim Kompilieren erhalte ich die Meldung<br />
In member function »double temperatur::vorlauf()«:<br />
Fehler: »cin« wurde in diesem Gültigkeitsbereich nicht definiert</p>
<p>Komme da nicht weiter.</p>
<p>Gruß<br />
Bernd</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/252293/cin-innerhalb-eigener-klasse</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 14:32:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/252293.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 17 Oct 2009 17:09:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to cin innerhalb eigener Klasse on Sat, 17 Oct 2009 17:09:47 GMT]]></title><description><![CDATA[<p>Hallo zusammen,<br />
als Anfänger benötige ich eure Hilfe.<br />
Ich möchte ein Programm zur Heizungssteuerung schreiben. Das Programm digitemp liefert die Temperatur, system(&quot;digitemp -t0&quot;); gibt z.Bsp. 20.15 aus.<br />
class temperatur<br />
{<br />
int temp;</p>
<p>public:<br />
temperatur() : temp(0)<br />
{<br />
}</p>
<p>double vorlauf()<br />
{<br />
system(&quot;digitemp -t0&quot;);<br />
cin &gt;&gt; temp;<br />
//return temp;<br />
}<br />
};</p>
<p>Beim Kompilieren erhalte ich die Meldung<br />
In member function »double temperatur::vorlauf()«:<br />
Fehler: »cin« wurde in diesem Gültigkeitsbereich nicht definiert</p>
<p>Komme da nicht weiter.</p>
<p>Gruß<br />
Bernd</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793903</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793903</guid><dc:creator><![CDATA[bernd_h_schulz]]></dc:creator><pubDate>Sat, 17 Oct 2009 17:09:47 GMT</pubDate></item><item><title><![CDATA[Reply to cin innerhalb eigener Klasse on Sat, 17 Oct 2009 17:17:35 GMT]]></title><description><![CDATA[<p>Hast du iostream inkludiert? Außerdem fehlt der Namespace vor cin.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793908</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793908</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Sat, 17 Oct 2009 17:17:35 GMT</pubDate></item><item><title><![CDATA[Reply to cin innerhalb eigener Klasse on Sat, 17 Oct 2009 17:33:36 GMT]]></title><description><![CDATA[<p>benutze tags (Der C/C++ Button unter den smilies)</p>
<pre><code class="language-cpp">#include&lt;iostream&gt;
using namespace std;//oder siehe unten

class temperatur
{
int temp;

public:
temperatur() : temp(0)
{
}

double vorlauf()
{
system(&quot;digitemp -t0&quot;);
cin &gt;&gt; temp;//alternativ: std::cin &gt;&gt; temp;
//return temp;
}
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1793915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793915</guid><dc:creator><![CDATA[Fencer]]></dc:creator><pubDate>Sat, 17 Oct 2009 17:33:36 GMT</pubDate></item><item><title><![CDATA[Reply to cin innerhalb eigener Klasse on Sat, 17 Oct 2009 18:48:26 GMT]]></title><description><![CDATA[<p>Hallo David_pb,<br />
danke, das war es. Jedoch kann ich mit cin nicht die Bildschirmausgabe von digitemp einlesen. Habe noch nicht herausgefunden, wie das geht. Muß ich den Umweg über das Schreiben mit digitemp in eine Datei und dann wieder auslesen?</p>
<p>Gruß<br />
Bernd</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793946</guid><dc:creator><![CDATA[bernd_h_schulz]]></dc:creator><pubDate>Sat, 17 Oct 2009 18:48:26 GMT</pubDate></item></channel></rss>