Hello! I think this is probably simple but I am not quite good at this yet.
I want to read a random line from a text file of 100 million lines.
I was thinking I could set up a loop that uses rand() to just select the random line... So I would have (rand()%x)+1 where x == 100million and where after each loop x -= 1 .
so what I need to do is read a random line and then delete that random line from the file so that I don't read the same line twice and don't read a blank line. Any commands I should look up? I read something about fseek and I am still looking so I may find the answer before someone replies..