Access by line when inputting and outputting files

Asked 2 years ago, Updated 2 years ago, 122 views

As far as I know, if you use fseek, it moves in bytes, but can't you read it in rows? Currently, we are processing it arbitrarily through fgets. I'm saving five lines of information.

c fileinputstream

2022-09-21 15:40

1 Answers

There's a getline. If you look at the management line or the page below, there is a sample code.

https://linux.die.net/man/3/getline


2022-09-21 15:40

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.