제출 #44552

#제출 시각아이디문제언어결과실행 시간메모리
44552wzy질문 (CEOI14_question_grader)C++11
컴파일 에러
0 ms0 KiB
int encode (int n, int x, int y) { for(int j = 0 ; j <= 10 ; i++){ if((x & 1<<j) && !(y & 1<<j)){ return j + 1; } } }
int decode (int n, int q, int h) { h--; if(q & 1<<h){ return 1; } return 0; }

컴파일 시 표준 에러 (stderr) 메시지

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:2:29: error: 'i' was not declared in this scope
   for(int j = 0 ; j <= 10 ; i++){
                             ^
encoder.cpp:7:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^