#include<iostream>
int sum(int a, int b) return a+b;
컴파일 시 표준 에러 (stderr) 메시지
aplusb.cpp: In function 'int sum(int, int)':
aplusb.cpp:3:23: error: named return values are no longer supported
3 | int sum(int a, int b) return a+b;
| ^~~~~~
aplusb.cpp:3:34: error: expected '{' at end of input
3 | int sum(int a, int b) return a+b;
| ^
aplusb.cpp:3:34: warning: no return statement in function returning non-void [-Wreturn-type]