Using variables inside a for loop, instead of numbers
Frage
I have a piece of code that I am trying to get basic line from a text file, based on a user input in the screen. However that doesn't work because this only reads the first line of the text. But when I replace the variable (ban) in the for loop with a number, it works. Any help regarding this?
int ban; int i;
scanf("%d",&ban); for(i=ban; i<(ban+1); i++) ... .. ..
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow