Editing a specific line using files functions
#1

Hello,

Is that possible to edit a specific line using file functions? here is an example:
Код:
1,test
2,test
3,test
I wanna edit only the 2nd line, how can I do that using file functions?
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
You need to read the whole file in, write out lines you don't want to edit, edit and write out the line you want to change, then read in and write out the remainder of the file. This is not that easy, and the reason most people use libraries.
I don't need it as "name=value", that is why I don't use a library. Anyways, thanks for your answer.
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
I didn't say an INI library, just a library.
What kind of library supports that way?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)