Language: C++

#include <vector>
#include <iostream>

using namespace std;

template<typename Type> void print_vector(vector<Type> A)
{
	for (vector<Type>::size_type j = 0; j < A.size(); ++j)
	{
		if (j + 1 < A.size())
		{
			cout << A[j] << ' ';
		}
		else
		{
			cout << A[j] << endl;
		}
	}
}

template<typename Type> void intersion_sort(vector<Type>& A)
{
	for (vector<Type>::size_type i = 1; i < A.size(); ++i)
	{
		Type v = A[i];

		vector<Type>::size_type j = i - 1;

		while (j + 1 != 0 && A[j] > v)
		{
			A[j + 1] = A[j];

			j--;
		}

		A[j + 1] = v;

		print_vector(A);
	}
}

int main()
{
	int N;

	cin >> N;

	vector<int> A(N);

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

	print_vector(A);

	intersion_sort(A);

	return 0;
}

Compiler output:
a.cc: In function 'void print_vector(std::vector<Type>)':
a.cc:8:14: error: need 'typename' before 'std::vector<Type>::size_type' because 'std::vector<Type>' is a dependent scope
    8 |         for (vector<Type>::size_type j = 0; j < A.size(); ++j)
      |              ^~~~~~~~~~~~
a.cc:8:37: error: expected ';' before 'j'
    8 |         for (vector<Type>::size_type j = 0; j < A.size(); ++j)
      |                                     ^~
      |                                     ;
a.cc:8:45: error: 'j' was not declared in this scope
    8 |         for (vector<Type>::size_type j = 0; j < A.size(); ++j)
      |                                             ^
a.cc: In function 'void intersion_sort(std::vector<Type>&)':
a.cc:23:14: error: need 'typename' before 'std::vector<Type>::size_type' because 'std::vector<Type>' is a dependent scope
   23 |         for (vector<Type>::size_type i = 1; i < A.size(); ++i)
      |              ^~~~~~~~~~~~
a.cc:23:37: error: expected ';' before 'i'
   23 |         for (vector<Type>::size_type i = 1; i < A.size(); ++i)
      |                                     ^~
      |                                     ;
a.cc:23:45: error: 'i' was not declared in this scope
   23 |         for (vector<Type>::size_type i = 1; i < A.size(); ++i)
      |                                             ^
a.cc:27:17: error: need 'typename' before 'std::vector<Type>::size_type' because 'std::vector<Type>' is a dependent scope
   27 |                 vector<Type>::size_type j = i - 1;
      |                 ^~~~~~~~~~~~
a.cc:27:40: error: expected ';' before 'j'
   27 |                 vector<Type>::size_type j = i - 1;
      |                                        ^~
      |                                        ;
a.cc:29:24: error: 'j' was not declared in this scope
   29 |                 while (j + 1 != 0 && A[j] > v)
      |                        ^
a.cc:36:19: error: 'j' was not declared in this scope
   36 |                 A[j + 1] = v;
      |                   ^
a.cc: In instantiation of 'void print_vector(std::vector<Type>) [with Type = int]':
a.cc:55:14:   required from here
   55 |         print_vector(A);
      |         ~~~~~~~~~~~~^~~
a.cc:8:28: error: dependent-name 'std::vector<Type>::size_type' is parsed as a non-type, but instantiation yields a type
    8 |         for (vector<Type>::size_type j = 0; j < A.size(); ++j)
      |                            ^~~~~~~~~
a.cc:8:28: note: say 'typename std::vector<Type>::size_type' if a type is meant
a.cc: In instantiation of 'void intersion_sort(std::vector<Type>&) [with Type = int]':
a.cc:57:16:   required from here
   57 |         intersion_sort(A);
      |         ~~~~~~~~~~~~~~^~~
a.cc:23:28: error: dependent-name 'std::vector<Type>::size_type' is parsed as a non-type, but instantiation yields a type
   23 |         for (vector<Type>::size_type i = 1; i < A.size(); ++i)
      |                            ^~~~~~~~~
a.cc:23:28: note: say 'typename std::vector<Type>::size_type' if a type is meant
a.cc:27:31: error: dependent-name 'std::vector<Type>::size_type' is parsed as a non-type, but instantiation yields a type
   27 |                 vector<Type>::size_type j = i - 1;
      |                               ^~~~~~~~~
a.cc:27:31: note: say 'typename std::vector<Type>::size_type' if a type is meant