<?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[c-string mit inhalt eines 3D-arrays füllen]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>ich soll ein Prog in c++ schreiben, welches eine Zeichenkette (zahlen und Vorzeichen) einliest,die einzelnen Zeichen mit einer Pixelmatrix vergleicht und dann eine Zeichenkette aus den Pixelmustern der zeichen ausgibt.<br />
Also bei Eingabe: 1<br />
Ausgabe: {' ', ' ', ' ', 'X', ' '},<br />
{' ', ' ', 'X', 'X', ' '},<br />
{' ', 'X', ' ', 'X', ' '},<br />
{' ', ' ', ' ', 'X', ' '},<br />
{' ', ' ', ' ', 'X', ' '},<br />
{' ', ' ', ' ', 'X', ' '},<br />
{' ', ' ', ' ', 'X', ' '},<br />
{' ', ' ', ' ', 'X', ' '}</p>
<p>const int spalten = 5;<br />
const int zeilen = 8;<br />
const int spalte_int_line = 6;<br />
const int zeile_int_line = 8;<br />
const int laenge_int_line = 20;</p>
<p>typedef char pixel_font_t[zeilen][spalten];<br />
typedef char pixel_int_line_t[laenge_int_line][zeile_int_line][spalte_int_line];<br />
const pixel_font_t* getPixelsforChar (char aChar);<br />
int fillPixelLineWithInt(int zahl, pixel_int_line_t *zeiger);</p>
<p>const int zeichen = 12;<br />
const pixel_font_t matrix[zeichen] = {<br />
{<br />
{' ', 'X', 'X', 'X', ' '},<br />
{'X', ' ', ' ', ' ', 'X'},<br />
{'X', ' ', ' ', 'X', 'X'},<br />
{'X', ' ', 'X', ' ', 'X'},<br />
{'X', ' ', 'X', ' ', 'X'},<br />
{'X', 'X', ' ', ' ', 'X'},<br />
{'X', ' ', ' ', ' ', 'X'},<br />
{' ', 'X', 'X', 'X', ' '} usw....</p>
<p>const pixel_font_t* getPixelsforChar (char aChar) // Soll als result einen zeiger auf matrix liefern<br />
{<br />
int zmatrix;<br />
if (aChar = '/')<br />
zmatrix = 10;<br />
if (aChar = '-')<br />
zmatrix = 11;<br />
else<br />
zmatrix = (int)aChar;<br />
const pixel_font_t* result;<br />
result = &amp;matrix[zmatrix];</p>
<p>return result;<br />
}<br />
// Nun soll pixel_int_line_t mit den Pixeldarstellungen gefüllt werden</p>
<p>int fillPixelLineWithInt(int zahl, pixel_int_line_t *zeiger)<br />
{</p>
<p>// funktion soll pixel_int_line_t mit pixeln füllen und die Anzahl der dargestellten Symbole zurückgeben. Hab aber keine Ahnung wie?!!?</p>
<p>return result;<br />
}</p>
<p>Kann mir jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/228870/c-string-mit-inhalt-eines-3d-arrays-füllen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 28 Sep 2026 09:43:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/228870.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 03 Dec 2008 19:08:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to c-string mit inhalt eines 3D-arrays füllen on Wed, 03 Dec 2008 19:08:45 GMT]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>ich soll ein Prog in c++ schreiben, welches eine Zeichenkette (zahlen und Vorzeichen) einliest,die einzelnen Zeichen mit einer Pixelmatrix vergleicht und dann eine Zeichenkette aus den Pixelmustern der zeichen ausgibt.<br />
Also bei Eingabe: 1<br />
Ausgabe: {' ', ' ', ' ', 'X', ' '},<br />
{' ', ' ', 'X', 'X', ' '},<br />
{' ', 'X', ' ', 'X', ' '},<br />
{' ', ' ', ' ', 'X', ' '},<br />
{' ', ' ', ' ', 'X', ' '},<br />
{' ', ' ', ' ', 'X', ' '},<br />
{' ', ' ', ' ', 'X', ' '},<br />
{' ', ' ', ' ', 'X', ' '}</p>
<p>const int spalten = 5;<br />
const int zeilen = 8;<br />
const int spalte_int_line = 6;<br />
const int zeile_int_line = 8;<br />
const int laenge_int_line = 20;</p>
<p>typedef char pixel_font_t[zeilen][spalten];<br />
typedef char pixel_int_line_t[laenge_int_line][zeile_int_line][spalte_int_line];<br />
const pixel_font_t* getPixelsforChar (char aChar);<br />
int fillPixelLineWithInt(int zahl, pixel_int_line_t *zeiger);</p>
<p>const int zeichen = 12;<br />
const pixel_font_t matrix[zeichen] = {<br />
{<br />
{' ', 'X', 'X', 'X', ' '},<br />
{'X', ' ', ' ', ' ', 'X'},<br />
{'X', ' ', ' ', 'X', 'X'},<br />
{'X', ' ', 'X', ' ', 'X'},<br />
{'X', ' ', 'X', ' ', 'X'},<br />
{'X', 'X', ' ', ' ', 'X'},<br />
{'X', ' ', ' ', ' ', 'X'},<br />
{' ', 'X', 'X', 'X', ' '} usw....</p>
<p>const pixel_font_t* getPixelsforChar (char aChar) // Soll als result einen zeiger auf matrix liefern<br />
{<br />
int zmatrix;<br />
if (aChar = '/')<br />
zmatrix = 10;<br />
if (aChar = '-')<br />
zmatrix = 11;<br />
else<br />
zmatrix = (int)aChar;<br />
const pixel_font_t* result;<br />
result = &amp;matrix[zmatrix];</p>
<p>return result;<br />
}<br />
// Nun soll pixel_int_line_t mit den Pixeldarstellungen gefüllt werden</p>
<p>int fillPixelLineWithInt(int zahl, pixel_int_line_t *zeiger)<br />
{</p>
<p>// funktion soll pixel_int_line_t mit pixeln füllen und die Anzahl der dargestellten Symbole zurückgeben. Hab aber keine Ahnung wie?!!?</p>
<p>return result;<br />
}</p>
<p>Kann mir jemand helfen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1625086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1625086</guid><dc:creator><![CDATA[hagbard7995]]></dc:creator><pubDate>Wed, 03 Dec 2008 19:08:45 GMT</pubDate></item><item><title><![CDATA[Reply to c-string mit inhalt eines 3D-arrays füllen on Wed, 03 Dec 2008 19:54:00 GMT]]></title><description><![CDATA[<p>hagbard7995 schrieb:</p>
<blockquote>
<p>ich soll ein Prog in c++ schreiben,...</p>
</blockquote>
<p>*such* *dortnicht* *danicht*... also ich sehe im gesamten Code kein C++, sondern nur C.</p>
<p>hagbard7995 schrieb:</p>
<blockquote>
<p>Kann mir jemand helfen?</p>
</blockquote>
<p>Zeige, das du zumindestens dich schon mit der Aufgabe auseinander gesetzt hast, zeige das von dir geschriebene (bitte dann in den C/C++ Tags) und stell konkrete Fragen. Hausaufgaben ohne sichtbare Eigeninitiative werden hier in der Regel nur selten gemacht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1625100</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1625100</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Wed, 03 Dec 2008 19:54:00 GMT</pubDate></item></channel></rss>