Skip to content

이새연/3주차#4

Open
owhat02 wants to merge 1 commit into
YEOUL0520:mainfrom
owhat02:sy
Open

이새연/3주차#4
owhat02 wants to merge 1 commit into
YEOUL0520:mainfrom
owhat02:sy

Conversation

@owhat02
Copy link
Copy Markdown

@owhat02 owhat02 commented Sep 25, 2024

프로그래머스 개인정보 수집유효기간

프로그래머스 개인정보 수집유효기간
Copy link
Copy Markdown
Owner

@YEOUL0520 YEOUL0520 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--cpp 한글주석 오류(ㅠㅠ

Comment thread main.cpp

//����� ���ᳯ¥�� �������Ƥþƾ���� ��
for (int i = 0; i < index_pri; i++) {
if (stoi(date_y[i]) < stoi(today_year) ||
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이부분 가독성이 너무 떨어지는것같아요
해당 안되는 경우를 빼주는 쪽이 더 간단할 것 같음!

Comment thread main.cpp
if (date_m[j].size() == 1) { date_m[j] = "0" + date_m[j]; }
}
//���� �Ⱓ ���� ���
int ydata = (stoi(terms_month[i])) / 12;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

달의 경우 12달이 넘어갔을 때 나누기를 해주는 것은 좋았는데 연도 넘어가는걸 고려하지 않은 것 같아요!!

Copy link
Copy Markdown

@sseoh47 sseoh47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저 역시 한글 주석이 깨져 보여서 조금 신경쓰여요.
파일 인코딩 설정 때문인듯!! 추후 올릴때 config파일의 인코딩 설정을 utf-8로 바꾸면 될 것 같아요~.

Comment thread main.cpp
//���� �Ⱓ �� ���
int mdata = (stoi(terms_month[i])) % 12;
if ((stoi(date_m[j]) + mdata) > 12) { //���� 12�� �Ѿ ���
int date = stoi(date_m[j]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

문자열에서 정수형으로 형변환 후 문자열으로 바꿨다가 정수형태로 다시 계산하는 것이 있는 것 같아요. 계산이 계속 이어진다면 정수형태로 계속 한다면 코드가 좀 더 간단해질 것 같아요.

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

Successfully merging this pull request may close these issues.

3 participants