Skip to content

Latest commit

Β 

History

History

get_next_line

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Β 
Β 

πŸ“  Get_next_line

@42seoul : (2020.07.01 ~ 2020.07.15)

πŸ“– About

  • 이 ν”„λ‘œμ νŠΈλŠ” fd에 μ €μž₯된 파일 λ‚΄μš©μ„ "\n" κ°œν–‰ λ‹¨μœ„ μ€„λ‘œ λ°˜ν™˜ν•˜λŠ” ν•¨μˆ˜λ₯Ό κ΅¬ν˜„ν•©λ‹ˆλ‹€.(The aim of this project is to make you code a function that returns a line ending with a newline, read from a file descriptor.)
Type Function Description
file read get_next_line(int fd, char **line) Write a function which returns a line read from a file descriptor, without the newline.

πŸ“ Review

  • fd 관리와 static variable을 ν™œμš©ν•˜λŠ” 방법을 배울 수 μžˆμ—ˆμŠ΅λ‹ˆλ‹€.
  • python의 read.csv() ν•¨μˆ˜λ₯Ό λ§Œλ“ λ‹€κ³  ν–ˆμ„ λ•Œ λ‹¨μˆœνžˆ "\n" κ°œν–‰ λ‹¨μœ„λ‘œ 행을 λ‚˜λˆ„κ³  sep(κ΅¬λΆ„μž) λ‹¨μœ„λ‘œ 열을 λ‚˜λˆŒ 수 μžˆλŠ”λ° Cμ—μ„œλ„ 이제 Libft ν”„λ‘œμ νŠΈμ™€ Get_next_line ν”„λ‘œμ νŠΈ ν•¨μˆ˜λ₯Ό ν•©μΉ˜λ©΄ μ‰½κ²Œ read.csv() 같은 ν•¨μˆ˜λ₯Ό λ§Œλ“€ 수 μžˆλ‹€.

🏁 Run

  • Read File
    1. Iris.csv(뢓꽃 데이터)λ₯Ό "\n"κ°œν–‰ λ‹¨μœ„λ‘œ 읽기 -> get_next_line()
    2. κ°œν–‰ λ‹¨μœ„λ‘œ 읽은 데이터 user_output 으둜 μ €μž₯
    3. diff user_output ./Iris.csv

get_next_line_fileread


πŸ”— Reference

πŸ§‘πŸ»β€πŸ’» Author

kukim