답안 #4083

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
4083 2013-09-01T02:39:21 Z tncks0121 카드 (tutorial6) C++
컴파일 오류
0 ms 0 KB
#include "jeehak.h"

void jeehak (int A[]) {
  int i, s=0; for(i=1; i<=5; i++) while(A[i]--) send(i, 0);
}
#include "friends.h"

void  friends(int A[],int N,int X[],int Y[]) {
  int ret=0;
  int x; for(x=1; x<=5; x++) if(A[x]<0) break;
    for(int i=1; i<=N; i++) if(X[i] == x) ++ret;
      return ret;
}

Compilation message

jeehak.cpp: In function 'void jeehak(int*)':
jeehak.cpp:4:10: warning: unused variable 's' [-Wunused-variable]

friends.cpp: In function 'void friends(int*, int, int*, int*)':
friends.cpp:7:14: error: return-statement with a value, in function returning 'void' [-fpermissive]
grader_friends.c: In function 'int main()':
grader_friends.c:46:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
grader_friends.c:52:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
grader_friends.c:53:68: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
grader_friends.c: At global scope:
grader_friends.c:18:12: warning: '__now__' defined but not used [-Wunused-variable]