<?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[&amp;quot;display&amp;quot; programmieren]]></title><description><![CDATA[<p>Hallo, ich möchte so etwas wie ein display bauen...<br />
also:</p>
<p>.............<br />
.............<br />
.............</p>
<p>usw..<br />
ich möchte dann einzelne &quot;pixel&quot; ansprechen.<br />
ich stosse dort auf ein logistisches problem, denn wenn ich die einzelnen funktionen zum löschen/füllen eines pixels aufrufe, so löscht es diese beim nächsten aufruf.<br />
mein Code zum verständnis</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;windows.h&gt;

using namespace std;

//zum füllen
void fill(int spalte, int zeile){

}
//zum löschen
void clear(int spalte, int zeile, int width, int height){
    int s = 0;

    /*height /\
    //       ||
    //       \/  */
    while(s &lt; height){

        //width &lt;----&gt;
        int i = 0;
        while(i &lt; width){
            if((i+1) == spalte &amp;&amp; (s+1) == zeile){
                cout &lt;&lt; &quot;  &quot;;
            }
            else{
                cout &lt;&lt; &quot;. &quot;;
            }
            i++;
        }
        cout &lt;&lt; endl;
        s++;
    }
}
//zum erstellen der tabelle
void create_table(int width, int height){
    int s = 0;

    /*height /\
    //       ||
    //       \/    */
    while(s &lt; height){

        //width &lt;----&gt;
        int i = 0;
        while(i &lt; width){
            cout &lt;&lt; &quot;. &quot;;
            i++;
        }
        cout &lt;&lt; endl;
        s++;
    }
}

int main()
{
    int height = 10;
    int width = 10;
    create_table(width, height);
    Sleep(1000);
    system(&quot;cls&quot;);
    clear(1, 1, width, height);
    Sleep(1000);
    system(&quot;cls&quot;);
    clear(2, 2, width, height);
    return 0;
}
</code></pre>
<p>ausgaben sind dann das:</p>
<p>_.........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........</p>
<p>danach halt:<br />
..........<br />
._........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........</p>
<p>ich hoffe ihr versteht mich..<br />
danke im vorraus <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/topic/239553/quot-display-quot-programmieren</link><generator>RSS for Node</generator><lastBuildDate>Tue, 22 Sep 2026 00:03:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/239553.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 24 Apr 2009 18:16:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &amp;quot;display&amp;quot; programmieren on Fri, 24 Apr 2009 18:16:52 GMT]]></title><description><![CDATA[<p>Hallo, ich möchte so etwas wie ein display bauen...<br />
also:</p>
<p>.............<br />
.............<br />
.............</p>
<p>usw..<br />
ich möchte dann einzelne &quot;pixel&quot; ansprechen.<br />
ich stosse dort auf ein logistisches problem, denn wenn ich die einzelnen funktionen zum löschen/füllen eines pixels aufrufe, so löscht es diese beim nächsten aufruf.<br />
mein Code zum verständnis</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;windows.h&gt;

using namespace std;

//zum füllen
void fill(int spalte, int zeile){

}
//zum löschen
void clear(int spalte, int zeile, int width, int height){
    int s = 0;

    /*height /\
    //       ||
    //       \/  */
    while(s &lt; height){

        //width &lt;----&gt;
        int i = 0;
        while(i &lt; width){
            if((i+1) == spalte &amp;&amp; (s+1) == zeile){
                cout &lt;&lt; &quot;  &quot;;
            }
            else{
                cout &lt;&lt; &quot;. &quot;;
            }
            i++;
        }
        cout &lt;&lt; endl;
        s++;
    }
}
//zum erstellen der tabelle
void create_table(int width, int height){
    int s = 0;

    /*height /\
    //       ||
    //       \/    */
    while(s &lt; height){

        //width &lt;----&gt;
        int i = 0;
        while(i &lt; width){
            cout &lt;&lt; &quot;. &quot;;
            i++;
        }
        cout &lt;&lt; endl;
        s++;
    }
}

int main()
{
    int height = 10;
    int width = 10;
    create_table(width, height);
    Sleep(1000);
    system(&quot;cls&quot;);
    clear(1, 1, width, height);
    Sleep(1000);
    system(&quot;cls&quot;);
    clear(2, 2, width, height);
    return 0;
}
</code></pre>
<p>ausgaben sind dann das:</p>
<p>_.........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........</p>
<p>danach halt:<br />
..........<br />
._........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........<br />
..........</p>
<p>ich hoffe ihr versteht mich..<br />
danke im vorraus <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/1700875</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1700875</guid><dc:creator><![CDATA[spooooongq]]></dc:creator><pubDate>Fri, 24 Apr 2009 18:16:52 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;display&amp;quot; programmieren on Fri, 24 Apr 2009 19:57:00 GMT]]></title><description><![CDATA[<p>weiß niemand etwas?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1700912</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1700912</guid><dc:creator><![CDATA[spooooongq]]></dc:creator><pubDate>Fri, 24 Apr 2009 19:57:00 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;display&amp;quot; programmieren on Fri, 24 Apr 2009 20:33:21 GMT]]></title><description><![CDATA[<p>ich würde es an deiner stelle mal im winapi bereich versuchen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1700928</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1700928</guid><dc:creator><![CDATA[5cript]]></dc:creator><pubDate>Fri, 24 Apr 2009 20:33:21 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;display&amp;quot; programmieren on Fri, 24 Apr 2009 20:42:07 GMT]]></title><description><![CDATA[<p>Ich glaub eher er will das auf na ganz normalen Konsole mit Punkten als &quot;Pixel&quot; machen xD.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1700933</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1700933</guid><dc:creator><![CDATA[Fragensteller1]]></dc:creator><pubDate>Fri, 24 Apr 2009 20:42:07 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;display&amp;quot; programmieren on Sat, 25 Apr 2009 08:35:31 GMT]]></title><description><![CDATA[<p>Tim06TR schrieb:</p>
<blockquote>
<p>ich würde es an deiner stelle mal im winapi bereich versuchen</p>
</blockquote>
<p>echt? wie...<br />
ich glaube fragensteller1 hat mich besser verstanden.<br />
ich möchte in dem Dosfenster(das gleiche hat auch cmd) &quot;pixel&quot; mit punkten machen.<br />
es soll eine übung für treiber sein <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/1701025</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1701025</guid><dc:creator><![CDATA[spooooongq]]></dc:creator><pubDate>Sat, 25 Apr 2009 08:35:31 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;display&amp;quot; programmieren on Sat, 25 Apr 2009 08:39:13 GMT]]></title><description><![CDATA[<p>also nochmal genauer:<br />
ich könnte auch einfach so machen:</p>
<pre><code class="language-cpp">cout &lt;&lt; z1s1 &lt;&lt; z1s2 &lt;&lt; z1s3 &lt;&lt; z1s4 &lt;&lt; endl
     &lt;&lt; z2s1 &lt;&lt; z2s2 &lt;&lt; z2s3 &lt;&lt; z2s4 &lt;&lt; endl;
// z1s1 usw sind variablen für punkte //
</code></pre>
<p>usw...<br />
da ich aber verschiedengroße tabellen erzeugen möchte, kann ich es so nicht machen, obwohl es das einfachste wäre...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1701026</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1701026</guid><dc:creator><![CDATA[spooooongq]]></dc:creator><pubDate>Sat, 25 Apr 2009 08:39:13 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;display&amp;quot; programmieren on Sat, 25 Apr 2009 14:16:15 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Hum, dass wird so ohne weitere Mittel nicht ganz einfach. Du wirst schon Probleme nach dem Schreiben eines &quot;Pixels&quot; (wie du ihn nennst) kriegen, wenn du versuchst einen vorherigen zu bearbeiten.</p>
<p>Mfg.<br />
way</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1701146</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1701146</guid><dc:creator><![CDATA[Kóyaánasqatsi]]></dc:creator><pubDate>Sat, 25 Apr 2009 14:16:15 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;display&amp;quot; programmieren on Sat, 25 Apr 2009 15:58:04 GMT]]></title><description><![CDATA[<p>also ich habs jetz mit vielen variablen gemacht.<br />
hätte gerne aber noch ne andere möglichkeit <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/1701187</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1701187</guid><dc:creator><![CDATA[spooooongq]]></dc:creator><pubDate>Sat, 25 Apr 2009 15:58:04 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;display&amp;quot; programmieren on Sat, 25 Apr 2009 19:15:30 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Zeig mal her!</p>
<p>Mfg.<br />
way</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1701264</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1701264</guid><dc:creator><![CDATA[Kóyaánasqatsi]]></dc:creator><pubDate>Sat, 25 Apr 2009 19:15:30 GMT</pubDate></item><item><title><![CDATA[Reply to &amp;quot;display&amp;quot; programmieren on Thu, 07 May 2009 14:56:49 GMT]]></title><description><![CDATA[<p>also ich hab noch 1 variante..<br />
<strong>Mit einem mehrdimensionalen Array</strong>ist es am einfachsten.(Denke ich :D)</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;windows.h&gt;

using namespace std;

//variable der tabelle...
const char* table[1000][1000];

/* Tabelle mit werten vollschreiben
** @param - anzahl der spalten
** @param - anzahl der zeilen
*/
void create_table(int spalten, int zeilen){
    for(int z = 1;z &lt;=zeilen; z++){
        for(int s = 1;s &lt;= spalten; s++){
            table[s][z] = &quot;. &quot;;
        }
    }
}

/*  WERTE Der tabelle ausgeben....
** @param - anzahl der spalten
** @param - anzahl der zeilen
*/

void write_table(int spalten, int zeilen){
    for(int z = 1;z &lt;=zeilen; z++){
        for(int s = 1;s &lt;= spalten; s++){
            cout &lt;&lt; table[s][z];
        }
        cout &lt;&lt; endl;
    }

}

/*  WERT Der tabelle ändern....
** @param - anzahl der spalten
** @param - anzahl der zeilen
** @param - ziffer der spalte, die geändert werden soll
** @param - ziffer der zeile, die geändert werden soll
** @param - wert, mit dem die vorherige position überschrieben werden soll
*/
void change_table(int spalten,int zeilen,int spalte, int zeile, const char* value){
    table[spalte][zeile] = value;
    system(&quot;cls&quot;);
    write_table(spalten,zeilen);
}

//aufrufen der funktionen ....
int main(){
    //x = spalten  y = zeilen
    int x = 30;
    int y = 30;

    create_table(x,y);
    write_table(x,y);
    change_table(x,y,3,3,&quot;  &quot;);//hier wird der wert 3,3 in -&gt;  &lt;- geändert
}
</code></pre>
<p>hat n bisschen lang gedauert...(zum nachdenken :p )</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1707199</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1707199</guid><dc:creator><![CDATA[spooooongq]]></dc:creator><pubDate>Thu, 07 May 2009 14:56:49 GMT</pubDate></item></channel></rss>