konstanten variieren

Z

Zottel

Wie kombiniert man Konstanten variabel?

Die Absicht ist Konstanten KONST1, KONST2, KONST3, KONST4, KONST5,
KONST6, ...

In einer Schleife mit KONSTi, ... durchlaufend einstzten zu lassen.
Dies ist aber nicht möglich, da der Compiler mekert es wären zu viele
Wert für verwendete Befehle vorhanden.

Hier ein ausschnitt wie ich es gerne machen würde ...

#define KONST1 13 /*Konstanten festlegen*/
#define KONST2 7
#define KONST2 47

main() {

int c = getchar(), i; /*Variablen definieren und
initialisieren*/

for (i = 1, i <= 3, i++) /*Einfügen von ASCii Zeichen*/
putchar(c+KONSTi);
c = getchar();
}
}

Ich bedanke mich schon mal für Euro Info`s, bin ein C Neuling und
hoffe keine zu triviale oder bereits besprochenes Thema anszusprechen.
 
C

CBFalconer

Joachim said:
however: comp.lang.c is an english speaking newsgroup, for the
german speaking counterpart check de.comp.lang.c

No, c.l.c is a _primarily_ English speaking newsgroup, but is
international and accepts any language expressable in the available
text fonts. Failure to use English may seriously limit the
exposure of the message, but is completely allowable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top