Question

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

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top