I have read several similar questions that have been posted on this forum, however mine is a slight variation. I do want to edit the first line, but the trick comes in where there can be a couple of lines that can have the same value. For instance, it is highly possible that in a class of hundred students at least two-three might have the same first name. Given this constraint, I decided to assign each student with a roll number which will be unique. So the final text file will look like this----
Leonhard
Euler
123
Carl
Guass
234
Leonhard
Galois
345
Now suppose the user wants to edit the first name of a student name Leonhard, then how should I o about programming it in such a way that only, say 345's first name gets edited?
Please help.......
Thank You.