Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c++ 답안에서 배열들 선언하실때 크기 #98

Closed
Hjanice opened this issue Feb 11, 2023 · 2 comments
Closed

c++ 답안에서 배열들 선언하실때 크기 #98

Hjanice opened this issue Feb 11, 2023 · 2 comments

Comments

@Hjanice
Copy link

Hjanice commented Feb 11, 2023

c++ 답안에서 배열들 선언하실때 전역변수로 선언하면서 입력N의 최대값+5 로 하시던데 +5해주시는 이유가 있나요?

ex. N의 최대값이 50이라면
#define NM 55
이런식으로 50이 아니라 55로 하시는이유가 궁금합니다.

@rhs0266
Copy link
Owner

rhs0266 commented Feb 13, 2023

문제를 풀다보면 종종 N+2, N+3 번지에 접근할 일이 있다보니 항상 마음의 여유를 가지고 5 정도 추가하는 편입니다. 개인적인 취향이니 바꾸셔도 돼요!

@rhs0266 rhs0266 closed this as completed Feb 13, 2023
@Hjanice
Copy link
Author

Hjanice commented Feb 13, 2023

답변감사합니다
강의 덕분에 코드를 짜기전에 계산을 해보고 구조화하면서 스케치하는 과정을 자연스럽게 배우게 되니 도움이 많이 되었습니다.
운이 좋아 질좋은 강의를 듣게 되었네요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants