Skip to content

42cursus-youkim/get_next_line

Repository files navigation

get_next_line

why just don't use pathlib smh

The aim of this project is to make you code a function that returns a line, read from a file descriptor.

from pathlib import Path
for line in Path('README.md').open():
    print(line)

diffences to newer subject

old (this)

int get_next_line(int fd, char **line)

  • reference to char *line is passed to store lines read
  • returns lengths read, -1 if error

new

char *get_next_line(int fd)

  • returns read line
  • returns NULL if error

About

getting the next line

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published