11328번 - Strfry
안녕하세요
아래처럼 에러가 자꾸 나는데 뭐가 문제인지 모르겠습니다ㅠㅠ 지식인에도 남겨보고 하다 하루가 다 날아갔네요
도움 주시면 감사하겠습니다..
Main.cc: In function ‘int main()’:
Main.cc:20:5: warning: unused variable ‘i’ [-Wunused-variable]
20 | int i = 0, N = 0;
| ^
Main.cc:37:21: warning: iteration 26 invokes undefined behavior [-Waggressive-loop-optimizations]
37 | sum_a = sum_a + (s[j] - '0'); // 배열 s 원소 합
| ~~~^
Main.cc:31:18: note: within this loop
31 | for(int j = 0; j < 1000; j++) {
| ~~^~~~~~
댓글을 작성하려면 로그인해야 합니다.
ball0920 4년 전
안녕하세요
아래처럼 에러가 자꾸 나는데 뭐가 문제인지 모르겠습니다ㅠㅠ 지식인에도 남겨보고 하다 하루가 다 날아갔네요
도움 주시면 감사하겠습니다..
Main.cc: In function ‘int main()’:
Main.cc:20:5: warning: unused variable ‘i’ [-Wunused-variable]
20 | int i = 0, N = 0;
| ^
Main.cc:37:21: warning: iteration 26 invokes undefined behavior [-Waggressive-loop-optimizations]
37 | sum_a = sum_a + (s[j] - '0'); // 배열 s 원소 합
| ~~~^
Main.cc:31:18: note: within this loop
31 | for(int j = 0; j < 1000; j++) {
| ~~^~~~~~