Domanda

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++) ... .. ..

Nessuna soluzione corretta

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top