제출 #262905

#제출 시각아이디문제언어결과실행 시간메모리
262905dolphingarlic일차 함수 (tutorial4)C++14
컴파일 에러
0 ms0 KiB
solve(){int a=f(0);Report(f(1)-a,a);}

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

tutorial4.cpp:1:7: error: ISO C++ forbids declaration of 'solve' with no type [-fpermissive]
    1 | solve(){int a=f(0);Report(f(1)-a,a);}
      |       ^
tutorial4.cpp: In function 'int solve()':
tutorial4.cpp:1:15: error: 'f' was not declared in this scope
    1 | solve(){int a=f(0);Report(f(1)-a,a);}
      |               ^
tutorial4.cpp:1:20: error: 'Report' was not declared in this scope
    1 | solve(){int a=f(0);Report(f(1)-a,a);}
      |                    ^~~~~~
tutorial4.cpp:1:37: warning: no return statement in function returning non-void [-Wreturn-type]
    1 | solve(){int a=f(0);Report(f(1)-a,a);}
      |                                     ^