/in/foo.cc:1:21: warning: extra tokens at end of #include directive
#include <iostream> using namespace std; void Insert(int arr[], int& n, int x) { int i; for (i = n - 1; i >= 0 && arr[i] > x; i--) { arr[i + 1] = arr[i]; } arr[i + 1] = x; n++; } int main() { int n; cin >> n; int arr[n + 1]; for (int i = 0; i < n; i++) { cin >> arr[i]; } int x; cin >> x; Insert(arr, n, x); for (int i = 0; i < n; i++) { cout << arr[i] << " "; } cout << arr[n - 1]; return 0; }
^~~~~
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status