<?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[probleme mit einer do-while schleife]]></title><description><![CDATA[<p>Ich schreibe zur Zeit ein Programm in C++. Damit das Programm mehrmals abläft habe ich eine do-while Schleife erstellt.Jedoch wenn es kompiliieren soll, habe ich das Problem, das dim Kopiler Log steht, dass es bei dem while Wert ein Problem gibt: &quot;comparison between distinct pointer types `double (<em>)(int, double)' and `const char</em>' lacks a cast&quot;<br />
mein Code ist:</p>
<pre><code class="language-cpp">int main (void);
{
do 
{
//Hauptprogramm... 
cout&lt;&lt;&quot;M&quot;&lt;&lt;(char)148&lt;&lt;&quot;chten sie wieder von vorne anfangen? (1=ja)&quot;;
char jn;
cin&gt;&gt;jn; cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;endl&lt;&lt;endl;
}
while (jn==&quot;1&quot;);
cout&lt;&lt;&quot;Das Programm wird nun geschlossen.&quot;; system(&quot;PAUSE&quot;);
return 0;
}
</code></pre>
<p>Das Problem ist halt, dass ich das Programm nicht kompiliieren kann. Habt ihr eine Idee, was falsch ist?</p>
<p>Dazu habe ich noch eine andere Frage. Wie bzw. wo lege ich den locale wert fest? Also wie schreibe ich ihn? Z.Zt. habe ich</p>
<pre><code class="language-cpp">setlocale (LC_ALL, &quot;de_DE&quot;);
</code></pre>
<p>als erste zeile im int main,jedoch hat das keine auswirkung, zum Beispiel wenn man Zahlen eingeben muss, kann man bei long double Werten keine Kommas benutzen. (locale.h ist included)<br />
Was kann ich hier machen?</p>
<p>Bis dann Crysis_02</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/308895/probleme-mit-einer-do-while-schleife</link><generator>RSS for Node</generator><lastBuildDate>Wed, 05 Aug 2026 13:02:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/308895.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Oct 2012 21:13:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Mon, 08 Oct 2012 21:14:17 GMT]]></title><description><![CDATA[<p>Ich schreibe zur Zeit ein Programm in C++. Damit das Programm mehrmals abläft habe ich eine do-while Schleife erstellt.Jedoch wenn es kompiliieren soll, habe ich das Problem, das dim Kopiler Log steht, dass es bei dem while Wert ein Problem gibt: &quot;comparison between distinct pointer types `double (<em>)(int, double)' and `const char</em>' lacks a cast&quot;<br />
mein Code ist:</p>
<pre><code class="language-cpp">int main (void);
{
do 
{
//Hauptprogramm... 
cout&lt;&lt;&quot;M&quot;&lt;&lt;(char)148&lt;&lt;&quot;chten sie wieder von vorne anfangen? (1=ja)&quot;;
char jn;
cin&gt;&gt;jn; cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;endl&lt;&lt;endl;
}
while (jn==&quot;1&quot;);
cout&lt;&lt;&quot;Das Programm wird nun geschlossen.&quot;; system(&quot;PAUSE&quot;);
return 0;
}
</code></pre>
<p>Das Problem ist halt, dass ich das Programm nicht kompiliieren kann. Habt ihr eine Idee, was falsch ist?</p>
<p>Dazu habe ich noch eine andere Frage. Wie bzw. wo lege ich den locale wert fest? Also wie schreibe ich ihn? Z.Zt. habe ich</p>
<pre><code class="language-cpp">setlocale (LC_ALL, &quot;de_DE&quot;);
</code></pre>
<p>als erste zeile im int main,jedoch hat das keine auswirkung, zum Beispiel wenn man Zahlen eingeben muss, kann man bei long double Werten keine Kommas benutzen. (locale.h ist included)<br />
Was kann ich hier machen?</p>
<p>Bis dann Crysis_02</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258316</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258316</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Mon, 08 Oct 2012 21:14:17 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Mon, 08 Oct 2012 21:22:14 GMT]]></title><description><![CDATA[<p>&quot;1&quot; ist eine Zeichenkette aus dem Zeichen '1' und dem Zeichen '\0'<br />
'1' ist das Zeichen für die Ziffer Eins.</p>
<p>Locales: Du hast da anscheinend eine Anleitung für C gefunden. Du willst vermutlich<br />
<a href="http://www.cplusplus.com/reference/std/locale/" rel="nofollow">http://www.cplusplus.com/reference/std/locale/</a><br />
Aber ich nehme mal an, dass du davon kein Wort verstehst. Was willst du bei diesem Programm mit einem Setzen der locale erreichen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258318</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Mon, 08 Oct 2012 21:22:14 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Mon, 08 Oct 2012 21:28:13 GMT]]></title><description><![CDATA[<p>Ah ok. Dann werde ich das mal morgen mit der 1 ändern.</p>
<p>Mit der locale will ich erreichen, dass man bei kommazahlen ein Komma statt Punkt eigeben muss</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258321</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258321</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Mon, 08 Oct 2012 21:28:13 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Mon, 08 Oct 2012 21:32:52 GMT]]></title><description><![CDATA[<p>hinter dem main() steht ein semikolon, das gehört da nicht hin (oder?)...die sache mit main(void) habe ich auch noch nicht gesehen, bisher habe ich nur main(String args, char* argv[]) gesehen...das sieht in meinen augen etwas komisch aus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258323</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258323</guid><dc:creator><![CDATA[R.Paul W.]]></dc:creator><pubDate>Mon, 08 Oct 2012 21:32:52 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Mon, 08 Oct 2012 21:48:33 GMT]]></title><description><![CDATA[<p>@R.Paul W.<br />
main(String args, char* argv[]) habe ich auch noch nie gesehen xDDD</p>
<p>int main(int argc, char* argv[]);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258325</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258325</guid><dc:creator><![CDATA[roflcopter]]></dc:creator><pubDate>Mon, 08 Oct 2012 21:48:33 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 06:10:47 GMT]]></title><description><![CDATA[<p>Jo. Muss der code aufm handy noch falscher sein xD ja der ist richtig:<br />
int main(String args, char* argv[]</p>
<p>Und gibt es eine möglichkeit anstatt punkten kommas zu benutzen(bei Kommazahlen)? Und wenn ja wie mache ich das?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258341</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258341</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Tue, 09 Oct 2012 06:10:47 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 06:47:07 GMT]]></title><description><![CDATA[<p>Crysis_02 schrieb:</p>
<blockquote>
<p>ja der ist richtig:<br />
int main(String args, char* argv[]</p>
</blockquote>
<p>Nein, der ist total falsch.</p>
<p>Crysis_02 schrieb:</p>
<blockquote>
<p>Und gibt es eine möglichkeit anstatt punkten kommas zu benutzen(bei Kommazahlen)? Und wenn ja wie mache ich das?</p>
</blockquote>
<p>Beispiel:</p>
<pre><code class="language-cpp">#include &lt;locale&gt;

struct myFacet : public std::numpunct&lt;char&gt;
{
        char do_decimal_point() const {return ',';}
};

#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;iterator&gt;

int main()
{
        std::istringstream stream(&quot;3,451&quot;);

        stream.imbue(std::locale(std::locale(), new myFacet));

        std::cout &lt;&lt; *std::istream_iterator&lt;float&gt;(stream);
}
</code></pre>
<p><strong>Ideone:</strong> <a href="http://ideone.com/nYP0T" rel="nofollow">http://ideone.com/nYP0T</a></p>
<p>Du leitest also von dem gewünschten facet ab (Z. 3-6) und erstellst ein entsprechendes locale (Z. 16, temporär). Dieses <code>imbue()</code> st du dann in den Stream (Z. 16), der modifiziert werden soll (das kann auch <code>cin</code> , oder <code>cout</code> usw. sein). Das wars.</p>
<p>P.S.: Wenn du dieses facet für locales mit <code>wcin</code> verwenden möchtest, musst du alle Vorkommnisse von <code>char</code> durch <code>wchar_t</code> ersetzen, und <code>','</code> durch <code>L','</code> .</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258348</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258348</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Tue, 09 Oct 2012 06:47:07 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 06:55:28 GMT]]></title><description><![CDATA[<p>Ok dann werde ich ds mal. so ausprobieren.</p>
<p>Und wie muss ich den main tag definieren?</p>
<p>Wie ihr merkt bin ich grade ganz am anfang bein programmieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258350</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258350</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Tue, 09 Oct 2012 06:55:28 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 07:01:53 GMT]]></title><description><![CDATA[<p>Crysis_02 schrieb:</p>
<blockquote>
<p>Wie ihr merkt bin ich grade ganz am anfang bein programmieren.</p>
</blockquote>
<p>Oh, tut mir Leid!<br />
Der Standard sagt:</p>
<p>N3337 3.6.1/2 schrieb:</p>
<blockquote>
<p>All implementations shall<br />
allow both of the following definitions of main:</p>
<pre><code class="language-cpp">int main() { /* ... */ }
</code></pre>
<p>and</p>
<pre><code class="language-cpp">int main(int argc, char* argv[]) { /* ... */ }
</code></pre>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/2258352</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258352</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Tue, 09 Oct 2012 07:01:53 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 07:15:07 GMT]]></title><description><![CDATA[<p>Ja wenn ich nach hause komme veränder ich das mal und melde ich dann wenn ich noch probleme habe dann melde uch mich noch mal.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258354</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258354</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Tue, 09 Oct 2012 07:15:07 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 12:41:23 GMT]]></title><description><![CDATA[<p>So nachden es sich nicht gebessert hat, poste ich hier einfach mal mein Programm rein. Es ist nicht so ordentlich aber ist ja nicht so schlimm hoffe ich mal.</p>
<pre><code class="language-cpp">#include &lt;cstdlib&gt;
#include &lt;iostream&gt;
#include &lt;math.h&gt;
#include &lt;locale.h&gt;
#include &lt;istream&gt;

using namespace std;

int main(int argc, char* argv[])
{
    do
    {
    long double pixcox;
    long double pixcoy;
    cout&lt;&lt;&quot;Haben Sie das Bild gespiegelt?&quot;&lt;&lt;endl;
    system(&quot;PAUSE&quot;);
    cout&lt;&lt;&quot;Bitte geben Sie den x-Koordinaten-Wert an (pixel-Wert):&quot;;
    cin&gt;&gt;pixcox;
    cout&lt;&lt;&quot;Bitte geben Sie den y-Koordinaten-Wert an (pixel-Wert):&quot;;
    cin&gt;&gt;pixcoy;
    long double numcox ((512-pixcox)*(-1));
    long double numcoy (512-pixcoy);
    if (numcox == -0 and numcoy == 0)
    {
        cout &lt;&lt; &quot;Die Koordinaten nach dem Buchmuster sind (&quot; &lt;&lt;numcox*(-1)&lt;&lt;&quot;|&quot;&lt;&lt;numcoy&lt;&lt;&quot;)&quot;&lt;&lt;endl;
    }
    else
    {
        cout &lt;&lt; &quot;Die Koordinaten nach den Buchmuster sind: (&quot; &lt;&lt;numcox&lt;&lt;&quot;|&quot;&lt;&lt;numcoy&lt;&lt;&quot;)&quot;&lt;&lt;endl;
    }
    long double radPM (hypot(numcox, numcoy));
    cout &lt;&lt;&quot;Der Radius (in Pixeln) vom sichtbaren Sonnenmittelpunkt ist:&quot; &lt;&lt; radPM &lt;&lt;endl;
    long double theta01 (numcoy/numcox);
    long double theta02 (atan(theta01));
    long double thetass (theta02*180/3.1415926);
    cout&lt;&lt;&quot;Der Theta' Wert ist:&quot;&lt;&lt;thetass&lt;&lt;&quot; Grad&quot;&lt;&lt;endl;
    long double thetas;
    if (numcox &gt; 0 and numcoy &gt; 0)
    {
                thetas = thetass + 0;
    }
    else if  (numcox &lt; 0 and numcoy &gt; 0)
    {
         thetas = thetass + 180;
    }
    else if (numcox &lt;0 and numcoy &lt; 0)
    {
         thetas = thetass + 180;
    }
    else if (numcox &gt; 0 and numcoy &lt; 0)
    {
         thetas = thetass + 360;
    }
    long double p;
    cout&lt;&lt;&quot;Bitte geben Sie den P-Wert ein:&quot;;
    cin&gt;&gt;p;
    long double theta (180-thetas-p);
    cout&lt;&lt;&quot;Der Theta-Wert ist:&quot;&lt;&lt;theta&lt;&lt;endl;
    long double B0;
    long double L0;
    cout&lt;&lt;&quot;Bitte geben Sie den B0-Wert ein:&quot;;
    cin&gt;&gt;B0;
    cout&lt;&lt;&quot;Bitte geben sie den L0-Wert ein:&quot;;
    cin&gt;&gt;L0;
    long double bg (180*3.1415926);
    long double rho (asin((radPM/512)/bg));
    long double bbogen (asin(cos(rho/bg)*sin(B0/bg)+sin(rho/bg)*sin(theta/bg)*cos(B0/bg)));
    long double bogen ((bbogen*180)/3.1415926);
    cout&lt;&lt;&quot;Der Sonnenfleck liegt auf einer Breite von &quot;&lt;&lt;bogen&lt;&lt;&quot;Grad&quot;&lt;&lt;endl;
    long double bAZM (asin(cos(theta/bg)*sin(rho/bg)/cos(bogen/bg)));
    long double AZM ((bAZM*180)/3.1415926);
    long double L (L0 + AZM);
    if (L&gt;360)
    {
                 L =(L-360);
    }
    else
    {
        L=L;
    }  
    cout&lt;&lt;&quot;Der Sonnenfleck liegt auf einer L&quot;&lt;&lt;(char)132&lt;&lt;&quot;nge von &quot;&lt;&lt;L&lt;&lt;&quot;Grad&quot;&lt;&lt;endl&lt;&lt;endl;
    cout&lt;&lt;&quot;Die Koordinaten sind   (&quot;&lt;&lt;bogen&lt;&lt;&quot;|&quot;&lt;&lt;L&lt;&lt;&quot;)&quot;&lt;&lt;endl&lt;&lt;endl&lt;&lt;endl;
    cout&lt;&lt;&quot;M&quot;&lt;&lt;(char)148&lt;&lt;&quot;chten sie wieder von vorne anfangen? (1=ja)&quot;;
    long double jn;
    cin&gt;&gt;jn;
    cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;endl&lt;&lt;endl;
    }
    while (jn=='1');
    cout&lt;&lt;&quot;Das Programm wird nun geschlossen.&quot;;          
    system(&quot;PAUSE&quot;);
    return 0;
    }
</code></pre>
<p>Weiterhin habe ich die Frage, ob man beim Kosius den Input wert auch als Bogenmass eigeben muss?</p>
<p>Ja ich das mit den locale nicht so richtig verstanden habe, würde ich gerne mal IDIOTENSICHER erklärt haben, wo ich diesen hinschreibe, bzw. in den og. Programm einfüge.</p>
<p>PS: Ich bin leider nicht so der hellste Kopf in C++ also bitte nicht aufregen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258467</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258467</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Tue, 09 Oct 2012 12:41:23 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 12:50:56 GMT]]></title><description><![CDATA[<p>Ja, die ganzen Kreisfunktionen arbeiten mit Bogenmaß.<br />
Wozu locale? Du bist noch recht neu in C++ und ich würde dir zuerst raten, andere Sachen zu lernen.</p>
<p>gruß<br />
syntax</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258471</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258471</guid><dc:creator><![CDATA[Syntax_error]]></dc:creator><pubDate>Tue, 09 Oct 2012 12:50:56 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 12:55:14 GMT]]></title><description><![CDATA[<p>Ich finde das mit dem locale ist einfach einfacher einzugeben <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> das Programm ist ja nicht nur für mich. Ich habe trotzdem eine Frage.</p>
<p>Ich kann das Programm nicht kompiliieren, da ich an der while Schleife hängen bleibe. Da steht:<br />
&quot;ISO C++ forbids comparison between pointer and integer&quot;</p>
<p>Ich habe doch aber gar keine pionter.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258474</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258474</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Tue, 09 Oct 2012 12:55:14 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 12:58:18 GMT]]></title><description><![CDATA[<p>Fehlermeldung an welcher Stelle?</p>
<p>gruß<br />
syntax</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258475</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258475</guid><dc:creator><![CDATA[Syntax_error]]></dc:creator><pubDate>Tue, 09 Oct 2012 12:58:18 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 13:03:29 GMT]]></title><description><![CDATA[<p>roflcopter schrieb:</p>
<blockquote>
<p>@R.Paul W.<br />
main(String args, char* argv[]) habe ich auch noch nie gesehen xDDD</p>
<p>int main(int argc, char* argv[]);</p>
</blockquote>
<p>upps ja <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /> hab mich vertippt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258479</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258479</guid><dc:creator><![CDATA[R.Paul W.]]></dc:creator><pubDate>Tue, 09 Oct 2012 13:03:29 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 13:07:56 GMT]]></title><description><![CDATA[<p>die Fehlermeldung bei dem</p>
<pre><code class="language-cpp">while (jn=='1')
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2258484</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258484</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Tue, 09 Oct 2012 13:07:56 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 13:17:33 GMT]]></title><description><![CDATA[<p>Crysis_02 schrieb:</p>
<blockquote>
<p>die Fehlermeldung bei dem</p>
<pre><code class="language-cpp">while (jn=='1')
</code></pre>
</blockquote>
<p>Das dürfte überhaupt nicht funktionieren, da es das jn in dem Kontext überhaupt nicht gibt (und wenn es das gäbe, dann wäre ein Vergleich von long double und char ziemlich ungewöhnlich. Du solltest wirklich mal die Grundlagen gründlicher lernen anstatt an locales zu denken. Bei dir fehlt da noch viel.</p>
<p>Die Fehlermeldung deutet darauf hin, dass der Quellcode so nicht vollständig ist und es von irgendwoher noch ein globales Symbol Namens jn gibt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258485</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258485</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 09 Oct 2012 13:17:33 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 13:34:55 GMT]]></title><description><![CDATA[<p>Ok, jn und long double kann ich weglassen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Wenn du aber für jn schon mit Zeichen vergleichst, kannst du auch gleich die Zeichen 'j' bzw 'n' nehmen.</p>
<p>Andererseits kannst du jn auch als int definieren.<br />
Dann usst du den Vergleich aber mit dem Wert 1 und nicht mit dem Zeichen '1' machen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258493</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258493</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Tue, 09 Oct 2012 13:34:55 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 13:51:40 GMT]]></title><description><![CDATA[<p>gut lassen wir das mal mit den locales weg.</p>
<p>Geht es denn nicht den Wert in do-Sektor festzulegen und dann bei while überprüefn zu lassen? Ich habe mal die Bezeichnung is janein geändert und jetzt bekomme ich halt den Fehler &quot;`janein' undeclared (first use this function)&quot;</p>
<pre><code class="language-cpp">//Anfang und Hauptprogramm
    cout&lt;&lt;&quot;M&quot;&lt;&lt;(char)148&lt;&lt;&quot;chten sie wieder von vorne anfangen? (1=ja)&quot;;
    long double janein;
    cin&gt;&gt;janein;
    cout&lt;&lt;endl&lt;&lt;endl&lt;&lt;endl&lt;&lt;endl;
    }
    while (janein=='1');
    cout&lt;&lt;&quot;Das Programm wird nun geschlossen.&quot;;          
    system(&quot;PAUSE&quot;);
    return 0;
    }
</code></pre>
<p>Oder wie kann mal sonst eine Schleife einbinden, dass das Programm wieder von vorne anfangen lässt?<br />
Bitte mit Beispiel <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258499</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258499</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Tue, 09 Oct 2012 13:51:40 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 13:54:42 GMT]]></title><description><![CDATA[<p>Du musst die Variable vor do definieren. Stichwort Gültigkeitsbereich.</p>
<p>Achja: du definierst eine long double, initialisierst sie nicht und überprüfst aber dann auf =='1'? Lass dir das nochmal durch den Kopf gehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>gruß<br />
syntax</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258502</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258502</guid><dc:creator><![CDATA[Syntax_error]]></dc:creator><pubDate>Tue, 09 Oct 2012 13:54:42 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 14:02:10 GMT]]></title><description><![CDATA[<p>So da ich jetzt endlich das Stichwort Gültigkeitsbereich bekomme habe geht es auch.</p>
<p>Jedoch möchte ich gerne trotzdem wissen, wie man Komma benutzen kann (locale) oder wie man Komma nach der Eingabe in Punkte umwandelt und dann so die Zahlen die Kommas benutzen kann.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258506</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258506</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Tue, 09 Oct 2012 14:02:10 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 14:07:23 GMT]]></title><description><![CDATA[<p>Crysis_02 schrieb:</p>
<blockquote>
<p>... oder wie man Komma nach der Eingabe in Punkte umwandelt und dann so die Zahlen die Kommas benutzen kann.</p>
</blockquote>
<p>Als String einlesen (dazu brauchst du auch den richigen Variablentyp), Komma ersetzen (Stringfunktionen), und in Zahl wandeln.</p>
<p>Das kannst du alles in einer Funktion machen, die du dann mehrmals aufrufst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258510</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258510</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Tue, 09 Oct 2012 14:07:23 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 14:13:37 GMT]]></title><description><![CDATA[<p>[quote=&quot;DirkB&quot;]<br />
.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258513</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258513</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Tue, 09 Oct 2012 14:13:37 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 14:16:36 GMT]]></title><description><![CDATA[<p>[quote=&quot;Sone&quot;]</p>
<p>DirkB schrieb:</p>
<blockquote>
<p>.</p>
</blockquote>
<p>Glück gehabt. Ich habe den Originaltext gerade noch gelesen. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258517</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258517</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Tue, 09 Oct 2012 14:16:36 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 14:22:27 GMT]]></title><description><![CDATA[<p>DirkB schrieb:</p>
<blockquote>
<p>Crysis_02 schrieb:</p>
<blockquote>
<p>... oder wie man Komma nach der Eingabe in Punkte umwandelt und dann so die Zahlen die Kommas benutzen kann.</p>
</blockquote>
<p>Als String einlesen (dazu brauchst du auch den richigen Variablentyp), Komma ersetzen (Stringfunktionen), und in Zahl wandeln.</p>
<p>Das kannst du alles in einer Funktion machen, die du dann mehrmals aufrufst.</p>
</blockquote>
<p>geht das mit dem strchr Befehl?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258521</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258521</guid><dc:creator><![CDATA[Crysis_02]]></dc:creator><pubDate>Tue, 09 Oct 2012 14:22:27 GMT</pubDate></item><item><title><![CDATA[Reply to probleme mit einer do-while schleife on Tue, 09 Oct 2012 14:41:42 GMT]]></title><description><![CDATA[<p>Crysis_02 schrieb:</p>
<blockquote>
<p>DirkB schrieb:</p>
<blockquote>
<p>Crysis_02 schrieb:</p>
<blockquote>
<p>... oder wie man Komma nach der Eingabe in Punkte umwandelt und dann so die Zahlen die Kommas benutzen kann.</p>
</blockquote>
<p>Als String einlesen (dazu brauchst du auch den richigen Variablentyp), Komma ersetzen (Stringfunktionen), und in Zahl wandeln.</p>
<p>Das kannst du alles in einer Funktion machen, die du dann mehrmals aufrufst.</p>
</blockquote>
<p>geht das mit dem strchr Befehl?</p>
</blockquote>
<p>Er meint, mit der <code>string</code> -Klasse aus der Standard-Bibliothek.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2258528</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2258528</guid><dc:creator><![CDATA[Sone]]></dc:creator><pubDate>Tue, 09 Oct 2012 14:41:42 GMT</pubDate></item></channel></rss>