Language: C++

using namespace std;

void insertionSort(int A[], int N);

int main()
{
	int N;
	cin >> N;
	int A[N];
	
	for (int i = 0; i < N; i++) cin >> A[i];

	insertionSort(A, N);

	return 0;
}

void insertionSort(int A[], int N)
{
	for (int i = 0; i < N; i++){
		int v = A[i];
		int j = i - 1;

		while (j >= 0 && A[j] > v){
			A[j + 1] = A[j];
			j--;
		}
		A[j + 1] = v;
		
		cout << A[0];
		for (j = 1; j < N; j++) cout << " " << A[j];
	????????????cout << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> N;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc: In function 'void insertionSort(int*, int)':
a.cc:30:17: error: 'cout' was not declared in this scope
   30 |                 cout << A[0];
      |                 ^~~~
a.cc:30:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:9: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |         ^
a.cc:32:10: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |          ^
a.cc:32:11: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |           ^
a.cc:32:12: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |            ^
a.cc:32:13: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |             ^
a.cc:32:14: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |              ^
a.cc:32:15: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |               ^
a.cc:32:16: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |                ^
a.cc:32:17: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |                 ^
a.cc:32:18: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |                  ^
a.cc:32:19: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |                   ^
a.cc:32:20: error: expected primary-expression before '?' token
   32 |         ????????????cout << endl;
      |                    ^
a.cc:32:29: error: 'endl' was not declared in this scope
   32 |         ????????????cout << endl;
      |                             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token
a.cc:32:33: error: expected ':' before ';' token
   32 |         ????????????cout << endl;
      |                                 ^
      |                                 :
a.cc:32:33: error: expected primary-expression before ';' token