ich habe mir die übung jetzt schon mehrmals durchgelesen und komm nicht da hinter wie ich es verstehen soll.
um auf den punkt zu kommen ist mein problem bei dem beispiel Quelltext, denn ich komme nicht da hinter wie ich in mir korrekt anzeigen lassen soll.
Code: Alles auswählen
#include <stdio.h>
int main(void)
{
for( int wert = 1; wert <= 5; wert = wert + 1 )
{
printf( "Ich bin bei '%d'{n", wert )
}
return 0;
}
Code: Alles auswählen
C:\Users\Micha\Desktop\c\hworld>gcc 8hworld.c
8hworld.c: In function 'main':
8hworld.c:6:3: error: 'for' loop initial declarations are only allowed in C99 mo
de
8hworld.c:6:3: note: use option -std=c99 or -std=gnu99 to compile your code
8hworld.c:9:3: error: expected ';' before '}' token
danke schon mal in voraus
Edit by cloidnerux: Code-Tags