<?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[Trotz FAQ schließen die Programme automatisch]]></title><description><![CDATA[<p>Hallo,</p>
<p>habe mir auf eurer Seite die Anweisung gegen das automatische schließen durchgelesen und angewendet.</p>
<p>Trotzdem schließt sich die Konsole nach F9 automatisch, woran liegts? Nutze von der Uni aus Borland Developer Studio 2006, dort gehts super, aber zu Hause schließt die Konsole. <sub>.</sub></p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;

void wait ()
{
    std::cin.clear();
    std::cin.ignore(std::cin.rdbuf()-&gt;in_avail());
    std::cin.get();
}

void main()
{
    cout&lt;&lt;&quot;Hello World!&quot;&lt;&lt;endl;
    return 0;
}
</code></pre>
<p>Was kann ich tun?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/181015/trotz-faq-schließen-die-programme-automatisch</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 01:59:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/181015.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 May 2007 09:25:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 09:25:31 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>habe mir auf eurer Seite die Anweisung gegen das automatische schließen durchgelesen und angewendet.</p>
<p>Trotzdem schließt sich die Konsole nach F9 automatisch, woran liegts? Nutze von der Uni aus Borland Developer Studio 2006, dort gehts super, aber zu Hause schließt die Konsole. <sub>.</sub></p>
<pre><code class="language-cpp">#include &lt;iostream.h&gt;

void wait ()
{
    std::cin.clear();
    std::cin.ignore(std::cin.rdbuf()-&gt;in_avail());
    std::cin.get();
}

void main()
{
    cout&lt;&lt;&quot;Hello World!&quot;&lt;&lt;endl;
    return 0;
}
</code></pre>
<p>Was kann ich tun?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281394</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281394</guid><dc:creator><![CDATA[Shadow Prison]]></dc:creator><pubDate>Wed, 09 May 2007 09:25:31 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 09:28:27 GMT]]></title><description><![CDATA[<p>Du musst die Funktion wait natürlich am Ende von main aufrufen!</p>
<p>Außerdem heißt es <code>int main()</code> und nicht <code>void main()</code> und iostream.h ist auch falsch. Das heißt einfach nur iostream!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281397</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281397</guid><dc:creator><![CDATA[rüdiger]]></dc:creator><pubDate>Wed, 09 May 2007 09:28:27 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 09:28:04 GMT]]></title><description><![CDATA[<p>vielleicht deine wait() Funktion aufrufen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281398</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281398</guid><dc:creator><![CDATA[zeigerzeiger]]></dc:creator><pubDate>Wed, 09 May 2007 09:28:04 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 09:28:48 GMT]]></title><description><![CDATA[<p>Erstens mußt du eine Funktion auch <strong>aufrufen</strong>, damit sie etwas bewirken kann.</p>
<p>Und zweitens heißt das &quot;<strong>int</strong> main()&quot; und &lt;iostream&gt; (ohne .h).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281399</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281399</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 09 May 2007 09:28:48 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 09:35:22 GMT]]></title><description><![CDATA[<p>Ups, sry. Bin Anfänger. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /> Hab vor paar Tagen erst mit C++ begonnen. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Jetzt stehts so im Quellcode, trotzdem schließt das Programm wieder:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;

void wait ()
{
    std::cin.clear();
    std::cin.ignore(std::cin.rdbuf()-&gt;in_avail());
    std::cin.get();
}

int main()
{
    cout&lt;&lt;&quot;Hello World!&quot;&lt;&lt;endl;
    wait();
    return 0;
}
</code></pre>
<p>Wo liegt nun der Fehler? Hoffentlich ist er nicht zu simpel. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281403</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281403</guid><dc:creator><![CDATA[Shadow Prison]]></dc:creator><pubDate>Wed, 09 May 2007 09:35:22 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 09:43:14 GMT]]></title><description><![CDATA[<p>Wie kommen eigentlich die Leute immer auf die Idee, dass ich (der Benutzer) nochmal extra das Programmende bestaetigen will? Konsolenprogramme rufe ich in der Konsole auf, das heisst, die Ausgabe kann ich auch wunderbar nach Programmende noch betrachten...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281409</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281409</guid><dc:creator><![CDATA[SG1]]></dc:creator><pubDate>Wed, 09 May 2007 09:43:14 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 09:44:59 GMT]]></title><description><![CDATA[<p>Bei manchen Implementierungen liefert in_avial() nicht das richtige Ergebnis. Versuch's mal so:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;limits&gt;
void wait ()
{
    std::cin.clear();
    std::cin.ignore(std::numeric_limits&lt;size_t&gt;::max(),'\n');
    std::cin.get();
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1281411</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281411</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Wed, 09 May 2007 09:44:59 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 10:21:44 GMT]]></title><description><![CDATA[<p>@ SG1, weil ich ja sehen will obs klappt. <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>Das ändert leider nichts daran :(:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;limits&gt;

void wait ()
{
    std::cin.clear();
    std::cin.ignore(std::numeric_limits&lt;size_t&gt;::max(),'\n');
    std::cin.get();
}

int main()
{
    cout&lt;&lt;&quot;Hello World!&quot;&lt;&lt;endl;
    wait();
    return 0;
}
</code></pre>
<p>Und das geht auch nicht:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;conio.h&gt; 
#include &lt;windows.h&gt;

void wait () 
{ 
    FlushConsoleInputBuffer(GetStdHandle(STD_INPUT_HANDLE)); 
    getch(); 
}

int main()
{
    cout&lt;&lt;&quot;Hello World!&quot;&lt;&lt;endl;
    wait();
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1281442</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281442</guid><dc:creator><![CDATA[Shadow Prison]]></dc:creator><pubDate>Wed, 09 May 2007 10:21:44 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 10:23:53 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Auch wenn mich alle schlagen:</p>
<p>system(&quot;pause&quot;; statt wait()</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281443</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281443</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 09 May 2007 10:23:53 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 10:31:27 GMT]]></title><description><![CDATA[<p>Hmmm geht auch nicht.</p>
<p>Mittlerweile denke ich, dass es nicht am Quellcode liegt.</p>
<p>Habe eben testweise folgendes in mein Programm reingeschrieben:</p>
<pre><code class="language-cpp">float a;
cout&lt;&lt;&quot;Zahl eintippen: &quot;;
cin&gt;&gt;a;
</code></pre>
<p>Und nichts passiert. Das Programm startet und schließt, ich kann keine Eingabe tätigen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281452</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281452</guid><dc:creator><![CDATA[Shadow Prison]]></dc:creator><pubDate>Wed, 09 May 2007 10:31:27 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 10:32:38 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich hatte natürlich die schließende Klammer vergessen, aber das sagt dir ja dein compiler.</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281453</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281453</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 09 May 2007 10:32:38 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 10:34:23 GMT]]></title><description><![CDATA[<p>ich glaube dein compiler kompiliert gar nicht deinen code. gib mal irgend ein mist ein und guck ob dann fehler kommen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281454</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281454</guid><dc:creator><![CDATA[aijds]]></dc:creator><pubDate>Wed, 09 May 2007 10:34:23 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 10:35:07 GMT]]></title><description><![CDATA[<p>Ja, die Klammer war mir schon klar. Ein wenig kenn ich die Syntax ja schon. ^^</p>
<p>Aber frage an die Allgemeinheit, kann es ein Problem mit Borland C++ sein?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281456</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281456</guid><dc:creator><![CDATA[Shadow Prison]]></dc:creator><pubDate>Wed, 09 May 2007 10:35:07 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 10:36:50 GMT]]></title><description><![CDATA[<p>Sry für den Doppelpost, habs zu spät gesehen.</p>
<p>aijds schrieb:</p>
<blockquote>
<p>ich glaube dein compiler kompiliert gar nicht deinen code. gib mal irgend ein mist ein und guck ob dann fehler kommen.</p>
</blockquote>
<p>Stimmt, hab wieder irgendwas eingegeben und das Konsolenfenster startet und schließt, ich bekomme keine Fehlermeldung.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281460</guid><dc:creator><![CDATA[Shadow Prison]]></dc:creator><pubDate>Wed, 09 May 2007 10:36:50 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 10:38:46 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Worauf klickst du? Wann kommt die Konsole?</p>
<p>chrische</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281463</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281463</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Wed, 09 May 2007 10:38:46 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 10:51:25 GMT]]></title><description><![CDATA[<p>Ich drücke F9 und kurze Zeit später öffnet sich eine Windows Konsole und schließt sich wieder.</p>
<p>Hier mal die Debug Info:</p>
<p>Thread Start: Thread ID: 3716. Process Project1.exe (2164)<br />
Process Start: C:*PFAD*\Borland Studio Projects\Project1.exe. Base Address: $00400000. Process Project1.exe (2164)<br />
Module Load: Project1.exe. Has Debug Info. Base Address: $00400000. Process Project1.exe (2164)<br />
Module Load: ntdll.dll. No Debug Info. Base Address: $7C910000. Process Project1.exe (2164)<br />
Module Load: KERNEL32.dll. No Debug Info. Base Address: $7C800000. Process Project1.exe (2164)<br />
Module Load: rtl100.bpl. No Debug Info. Base Address: $51F00000. Process Project1.exe (2164)<br />
Module Load: OLEAUT32.dll. No Debug Info. Base Address: $770F0000. Process Project1.exe (2164)<br />
Module Load: msvcrt.dll. No Debug Info. Base Address: $77BE0000. Process Project1.exe (2164)<br />
Module Load: USER32.dll. No Debug Info. Base Address: $7E360000. Process Project1.exe (2164)<br />
Module Load: GDI32.dll. No Debug Info. Base Address: $77EF0000. Process Project1.exe (2164)<br />
Module Load: ADVAPI32.dll. No Debug Info. Base Address: $77DA0000. Process Project1.exe (2164)<br />
Module Load: RPCRT4.dll. No Debug Info. Base Address: $77E50000. Process Project1.exe (2164)<br />
Module Load: ole32.dll. No Debug Info. Base Address: $774B0000. Process Project1.exe (2164)<br />
Module Load: VERSION.dll. No Debug Info. Base Address: $77BD0000. Process Project1.exe (2164)<br />
Module Load: MPR.dll. No Debug Info. Base Address: $71A80000. Process Project1.exe (2164)<br />
Module Load: IMAGEHLP.dll. No Debug Info. Base Address: $76C50000. Process Project1.exe (2164)<br />
Module Load: WSOCK32.dll. No Debug Info. Base Address: $71A30000. Process Project1.exe (2164)<br />
Module Load: WS2_32.dll. No Debug Info. Base Address: $71A10000. Process Project1.exe (2164)<br />
Module Load: WS2HELP.dll. No Debug Info. Base Address: $71A00000. Process Project1.exe (2164)<br />
Module Load: OLEACC.dll. No Debug Info. Base Address: $74C00000. Process Project1.exe (2164)<br />
Module Load: MSVCP60.dll. No Debug Info. Base Address: $76020000. Process Project1.exe (2164)<br />
Module Load: borlndmm.dll. No Debug Info. Base Address: $21660000. Process Project1.exe (2164)<br />
Module Load: cc3270mt.dll. No Debug Info. Base Address: $32700000. Process Project1.exe (2164)<br />
Module Load: UxTheme.dll. No Debug Info. Base Address: $5B0F0000. Process Project1.exe (2164)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281471</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281471</guid><dc:creator><![CDATA[Shadow Prison]]></dc:creator><pubDate>Wed, 09 May 2007 10:51:25 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 10:58:57 GMT]]></title><description><![CDATA[<p>leg doch mal ein neues projekt an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281477</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281477</guid><dc:creator><![CDATA[....]]></dc:creator><pubDate>Wed, 09 May 2007 10:58:57 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 11:09:40 GMT]]></title><description><![CDATA[<p>Hab jetzt folgendes gemacht:</p>
<p>- Borland neugestartet<br />
- neues Projekt angelegt<br />
- &quot;Console Application&quot;<br />
- daraufhin öffnet sich unit.cpp &amp; Projekt1<br />
- in Projekt1 hab ich einfach nur &quot;asdadasd&quot; reingeschrieben<br />
- F9 gedrückt<br />
- dann kompiliert und linkt Borland ~25000 Zeilen (so wirds mir zumindest in dem Fenster angezeigt)<br />
- Errors: 0<br />
- Die Konsole öffnet sich und schließt sich.</p>
<p>Da muss doch irgendwo ein Einstellungsfehler sein oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281487</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281487</guid><dc:creator><![CDATA[Shadow Prison]]></dc:creator><pubDate>Wed, 09 May 2007 11:09:40 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 11:33:42 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Kleiner Tip : Dein Quellcode gehört in die Unit.cpp, nicht in die Project1.bpf .<br />
Und dort drin findest du nämlich auch schon eine main-Funktion (kann auch WinMain sein, ist aber auch gut). Diese brauchst du nur zu erweitern. Du darfst aber auch nicht die WinMain-Deklaration durch main ersetzen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281510</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281510</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 09 May 2007 11:33:42 GMT</pubDate></item><item><title><![CDATA[Reply to Trotz FAQ schließen die Programme automatisch on Wed, 09 May 2007 12:21:40 GMT]]></title><description><![CDATA[<p>Das war der Fehler. Da hatte ich aber auch ein Brett vorm Kopf.</p>
<p>Danke an alle. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1281551</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1281551</guid><dc:creator><![CDATA[Shadow Prison]]></dc:creator><pubDate>Wed, 09 May 2007 12:21:40 GMT</pubDate></item></channel></rss>