안녕하세요
알고스팟을 처음 접하게 된 학생입니다.
picnic 문제를 비쥬얼 스튜디오에서 풀고
채점을 받고 싶어서 올렸는데
계속해서 컴파일 오류가 뜨네요
c언어로 작성했는데 왜 채점 프로그램에서만 계속 컴파일이 안되는지 모르겠네요 ㅠㅠ
submission.c: In function ‘main’:
submission.c:37:29: error: passing argument 1 of ‘countPairings’ from incompatible pointer type
outPut[i] = countPairings(taken);
^
submission.c:6:5: note: expected ‘_Bool *’ but argument is of type ‘int *’
int countPairings(bool taken[]);
^
submission.c:17:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &C);
^
submission.c:19:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &C);
^
submission.c:22:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &staticSize, &twinNum);
^
submission.c:29:4: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &temp1, &temp2);
^
chelgi03
안녕하세요
알고스팟을 처음 접하게 된 학생입니다.
picnic 문제를 비쥬얼 스튜디오에서 풀고
채점을 받고 싶어서 올렸는데
계속해서 컴파일 오류가 뜨네요
c언어로 작성했는데 왜 채점 프로그램에서만 계속 컴파일이 안되는지 모르겠네요 ㅠㅠ
submission.c: In function ‘main’:
submission.c:37:29: error: passing argument 1 of ‘countPairings’ from incompatible pointer type
outPut[i] = countPairings(taken);
^
submission.c:6:5: note: expected ‘_Bool *’ but argument is of type ‘int *’
int countPairings(bool taken[]);
^
submission.c:17:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &C);
^
submission.c:19:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &C);
^
submission.c:22:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &staticSize, &twinNum);
^
submission.c:29:4: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &temp1, &temp2);
^
7년 전