<?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[Main.exe Funktioniert nicht mehr]]></title><description><![CDATA[<p>Hallo,<br />
ich arbeite seit kurzem an einer Graphics Library. Aber wenn ich das Programm Starte kommt nach kurzer Zeit (nachdem auf dem Terminal 8-10 x'e geschrieben wurden) eine Meldung das die Main.exe nicht mehr Funktioniert. Und ich weiß leider nicht was das Problem ist ... Könnt ihr mir Bitte bei dem Problem Helfen ?</p>
<p>main.cpp:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;windows.h&gt;
#include &quot;Screen.h&quot;
using namespace std;

int main () {

	glSetScreen (50, 20, &quot;Test&quot;);
	glLoadScreen ();
	cin.get();
	return 0;
}
</code></pre>
<p>glLoadScreen/ Screen.h:</p>
<pre><code>void glLoadScreen (){

	int x = 0;
	int y = 0;
	int f = 32;
	int v = 31;
	int i = 1;

	while ( x != 1023 &amp;&amp; y != 31) {

		Screen [x] [y] = ' ';
		x++;
		std::cout &lt;&lt; &quot;x&quot;;
		Sleep (100);
		if ( x = v) {

			y++;
			i++;
			v = f * i - 1;
		}
		if ( x == 1023 &amp;&amp; y == 31)
			break;
	}
}
</code></pre>
<p>Gruß iHofel</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/315109/main-exe-funktioniert-nicht-mehr</link><generator>RSS for Node</generator><lastBuildDate>Fri, 31 Jul 2026 13:34:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/315109.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 23 Mar 2013 23:45:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Main.exe Funktioniert nicht mehr on Sat, 23 Mar 2013 23:45:30 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich arbeite seit kurzem an einer Graphics Library. Aber wenn ich das Programm Starte kommt nach kurzer Zeit (nachdem auf dem Terminal 8-10 x'e geschrieben wurden) eine Meldung das die Main.exe nicht mehr Funktioniert. Und ich weiß leider nicht was das Problem ist ... Könnt ihr mir Bitte bei dem Problem Helfen ?</p>
<p>main.cpp:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;windows.h&gt;
#include &quot;Screen.h&quot;
using namespace std;

int main () {

	glSetScreen (50, 20, &quot;Test&quot;);
	glLoadScreen ();
	cin.get();
	return 0;
}
</code></pre>
<p>glLoadScreen/ Screen.h:</p>
<pre><code>void glLoadScreen (){

	int x = 0;
	int y = 0;
	int f = 32;
	int v = 31;
	int i = 1;

	while ( x != 1023 &amp;&amp; y != 31) {

		Screen [x] [y] = ' ';
		x++;
		std::cout &lt;&lt; &quot;x&quot;;
		Sleep (100);
		if ( x = v) {

			y++;
			i++;
			v = f * i - 1;
		}
		if ( x == 1023 &amp;&amp; y == 31)
			break;
	}
}
</code></pre>
<p>Gruß iHofel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2309210</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2309210</guid><dc:creator><![CDATA[iHofel]]></dc:creator><pubDate>Sat, 23 Mar 2013 23:45:30 GMT</pubDate></item><item><title><![CDATA[Reply to Main.exe Funktioniert nicht mehr on Sun, 24 Mar 2013 00:17:48 GMT]]></title><description><![CDATA[<p>Wie ist Screen definiert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2309211</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2309211</guid><dc:creator><![CDATA[nwp3]]></dc:creator><pubDate>Sun, 24 Mar 2013 00:17:48 GMT</pubDate></item><item><title><![CDATA[Reply to Main.exe Funktioniert nicht mehr on Sun, 24 Mar 2013 08:33:22 GMT]]></title><description><![CDATA[<p>Zeile 16 macht bestimmt nicht das, was du willst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2309236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2309236</guid><dc:creator><![CDATA[Manni66]]></dc:creator><pubDate>Sun, 24 Mar 2013 08:33:22 GMT</pubDate></item><item><title><![CDATA[Reply to Main.exe Funktioniert nicht mehr on Sun, 24 Mar 2013 10:20:34 GMT]]></title><description><![CDATA[<p>Manni66 schrieb:</p>
<blockquote>
<p>Zeile 16 macht bestimmt nicht das, was du willst.</p>
</blockquote>
<p>Ja das hab ich gemerkt aber der &quot;Erorr&quot; ist immer noch da..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2309253</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2309253</guid><dc:creator><![CDATA[iHofel]]></dc:creator><pubDate>Sun, 24 Mar 2013 10:20:34 GMT</pubDate></item><item><title><![CDATA[Reply to Main.exe Funktioniert nicht mehr on Sun, 24 Mar 2013 10:22:47 GMT]]></title><description><![CDATA[<p>nwp3 schrieb:</p>
<blockquote>
<p>Wie ist Screen definiert?</p>
</blockquote>
<p>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2309254</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2309254</guid><dc:creator><![CDATA[iHofel]]></dc:creator><pubDate>Sun, 24 Mar 2013 10:22:47 GMT</pubDate></item><item><title><![CDATA[Reply to Main.exe Funktioniert nicht mehr on Sun, 24 Mar 2013 10:29:35 GMT]]></title><description><![CDATA[<p>Was ist Screen? Ein Array? Eine Klasse mit operator[]? Ein Container?<br />
Zeig mal, wo du den Namen Screen eingeführt hast.<br />
Ach, zeig am besten dem kompletten Inhalt von Screen.h.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2309258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2309258</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Sun, 24 Mar 2013 10:29:35 GMT</pubDate></item><item><title><![CDATA[Reply to Main.exe Funktioniert nicht mehr on Sun, 24 Mar 2013 10:33:32 GMT]]></title><description><![CDATA[<p>Nathan schrieb:</p>
<blockquote>
<p>Was ist Screen? Ein Array? Eine Klasse mit operator[]? Ein Container?<br />
Zeig mal, wo du den Namen Screen eingeführt hast.<br />
Ach, zeig am besten dem kompletten Inhalt von Screen.h.</p>
</blockquote>
<p>Das ist er:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;windows.h&gt;

char Screen [1024] [1024];

void glSetTerminal(short, short, LPCTSTR);
int glLoadScreen (short, short);
int glDrawScreen (short, short);

void glSetScreen(short width, short hight, LPCTSTR title) { 
    HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE); 
    SMALL_RECT size; 
    COORD b_size; 

    size.Left = 0; 
    size.Top = 0; 
    size.Right = width; 
    size.Bottom = hight; 
    b_size.X = width+1; 
    b_size.Y = hight+1; 

    SetConsoleWindowInfo(hCon, true, &amp;size); 
    SetConsoleScreenBufferSize(hCon, b_size); 
    SetConsoleTitle(title); 
}

int glLoadScreen (short X, short Y){

	int x, y = 0;

	while ( y != Y ){

		Screen [x] [y] = ' ';
		x++;

		if ( x == X) {

			y++;
			x = 0;
		}
		if ( y == Y) {
			break;
			return 0;
		}

	}
}

int glDrawScreen (short X, short Y) {

	int x = 0;
	int y = 0;

	while ( y != Y) {

		std::cout &lt;&lt; Screen [x] [y] ;
		x++;

		if ( x == X) {	
			y++;
			x = 0;
		}
		if ( y == Y) {
			break;
			return 0;
		}

	}
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2309260</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2309260</guid><dc:creator><![CDATA[iHofel]]></dc:creator><pubDate>Sun, 24 Mar 2013 10:33:32 GMT</pubDate></item><item><title><![CDATA[Reply to Main.exe Funktioniert nicht mehr on Sun, 24 Mar 2013 12:41:45 GMT]]></title><description><![CDATA[<blockquote>
<p>Zeile 16 macht bestimmt nicht das, was du willst.</p>
</blockquote>
<p>iHofel, aufgepasst! Schon lesen was Manni66 sagt. Da liegt nämlich dein Problem. Vermutlich stürzt es ab nachdem (mindestens) 33 mal &quot;x&quot; ausgegeben wurde. So lange läuft das Programm nämlich, bis x größer als 1023 ist und du auf Speicher zugreifst, der dir nicht gehört.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2309279</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2309279</guid><dc:creator><![CDATA[KMT]]></dc:creator><pubDate>Sun, 24 Mar 2013 12:41:45 GMT</pubDate></item><item><title><![CDATA[Reply to Main.exe Funktioniert nicht mehr on Sun, 24 Mar 2013 13:03:17 GMT]]></title><description><![CDATA[<p>KMT schrieb:</p>
<blockquote>
<blockquote>
<p>Zeile 16 macht bestimmt nicht das, was du willst.</p>
</blockquote>
<p>iHofel, aufgepasst! Schon lesen was Manni66 sagt. Da liegt nämlich dein Problem. Vermutlich stürzt es ab nachdem (mindestens) 33 mal &quot;x&quot; ausgegeben wurde. So lange läuft das Programm nämlich, bis x größer als 1023 ist und du auf Speicher zugreifst, der dir nicht gehört.</p>
</blockquote>
<p>iHofel schrieb:</p>
<blockquote>
<p>Manni66 schrieb:</p>
<blockquote>
<p>Zeile 16 macht bestimmt nicht das, was du willst.</p>
</blockquote>
<p>Ja das hab ich gemerkt und geändert aber der &quot;Erorr&quot; ist immer noch da..</p>
</blockquote>
<pre><code>if ( x == X) {

            y++;
            x = 0;
        }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2309282</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2309282</guid><dc:creator><![CDATA[iHofel]]></dc:creator><pubDate>Sun, 24 Mar 2013 13:03:17 GMT</pubDate></item><item><title><![CDATA[Reply to Main.exe Funktioniert nicht mehr on Sun, 24 Mar 2013 13:19:05 GMT]]></title><description><![CDATA[<p>Zeile 16 war if (x = v).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2309284</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2309284</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Sun, 24 Mar 2013 13:19:05 GMT</pubDate></item></channel></rss>