Giter VIP home page Giter VIP logo

til's People

Contributors

so-smile avatar

Watchers

 avatar

til's Issues

directory_210628.md

1. fread() and fwrite()
fread(void* ptr, size_t 크기, size_t 개수, FILE* fp): fp에서 count개의 원소를 가지는 배열을 가져와서 ptr이 가리키는 배열에 넣는데 각 원소의 크기는 size 바이트로 설정해 줄 수 있다.
fwrite(const void* ptr, size_t 크기, size_t 개수, FILE* fp): fp에 개수만큼의 원소를 가지는 배열을 ptr이 가리키는 배열에 쓰며 각각의 원소는 크기 바이트이다. fp에 써지는 전체 바이트 수는 크기x개수 가 된다.

2. 디렉토리 관련 함수
DIR* : 디렉토리를 나타내는 구분자로 디렉토리를 사용하기 전 DIR * dp; 와 같이 선언해줘야함
opendir(): 디렉토리를 열어주는 함수로, 열고자하는 디렉토리 경로를 입력으로 받고 DIR 구조체에 대한 포인터를 반환함. 만약 여는 것을 실패할시 NULL을 반환 <-> closedir(): 디렉토리 닫음
readdir(): 디렉토리 포인터가 가리키는 곳에 디렉토리 엔트리에 대한 포인터를 반환, 내용이 더 없으면 NULL을 리턴

<dirent.h 구조체 속 정보>
long d_ino: inode 넘버
off_t d_off: offset
unsigned short d_reclen: d_name 길이
char d_name[NAME_MAX+1]: 파일 이름

3. 여러사람들의 코드를 보면서 설명을 듣고 분석을 하는 것이 처음이라 신기했고 새로운 방법의 공부인 것 같아서 아직 낯설지만 분명히 배울점이 많았고, 볼 때 비슷한 부분도 있었지만 사람마다 다른 논리로, 여러 라이브러리와 함수를 사용하며 짰기 때문에 문제에 대해 여러 방법으로 접근할 수 있었다.
4. 아직 논리를 짜기 어려운 단계이지만 나의 수준에 맞게 단계적으로 알아보면서 코드를 짜고 이번 스터디를 통해 다른 사람의 코드를 보며 해석하는 능력을 키워야겠다는 생각을 하였다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.