Skip to content

hellosandile/Get_Next_Line

Repository files navigation

Get_Next_Line

Get_Next_Line is a project We Think Code_ project

It is a function that reads and allows you to read a line ending with a newline character from a file descriptor. When you call the function again on the same file, it grabs the next line. This project deals with memory allocation and when to free and allocate memory to prevent leaks

Return value:

  • return 1 when it read a line
  • return 0 when it finished reading a file
  • return -1 when an error occurs

Getting Started

Compiling

Run the following commands:

  • To compile
    • make
  • To remove objects:
    • make clean
  • To remove objects and binary file (program):
    • make fclean
  • To re-compile:
    • make re

Executing

To test the function, compile with main.c.

Built With

Authors

Sandile Mkhze - @hellosandile

About

Get Next LIne WTC project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published