https://www.learncpp.com/cpp-tutorial/comments/
Comment (주석)은 programmer-readalb note로 코드에 직접적으로 삽입된다
코드에 직접적으로 삽입되어 있으나 컴파일러는 이를 무시한다
따라서 프로그래머의 이해를 돕는데에만 사용된다
c++에서는 서로 다른 두개의 스타일이 있다
// 다음의 라인의 끝까지 한줄을 주석으로 쓴다
/, / 사이의 모든 문장을 주석 처리한다
Summary
- At the library, program, or function level, use comments to describe what.
- Inside the library, program, or function, use comments to describe how
- At the statement level, use comments to describe why.
라이브러리 프로그램 funtion레벨에서는 무엇을 구현했는지
그 안에서는 어떻게 구현했는지
statement level에서는 왜 그렇게 했는지
comment를 이용해 표현한다