Tell me, please, what is the error:
#include <iostream> #include <vector> using namespace std; template <typename T> void fillArray(vector<T> &arr) { T el; int size; cout << "Enter the number of elements: "; cin >> size; for (int i = 0; i < size; i++) { cin >> el; arr.push_back(el); } } template <typename T> void printArray(vector<T> arr) { for (int i = 0; i < arr.size(); i++) { cout << arr[i] << " | "; } cout << endl; } template <typename T> void removeEverySecond(vector<T> &arr) { for (int i = 0; i < arr.size(); i++) { if (i % 2 == 1) { arr.erase(arr.begin() + i); } } } int main() { vector<int> intVector; vector<string> stringVector; vector<float> floatVector; cout << "Filling intVector: " << endl << endl; fillArray(intVector); cout << "Filling stringVector: " << endl << endl; fillArray(stringVector); cout << "Filling floatVector: " << endl << endl; fillArray(floatVector); cout << "Printing intVector: " << endl << endl; printArray(intVector); cout << "Printing stringVector: " << endl << endl; printArray(stringVector); cout << "Printing floatVector: " << endl << endl; printArray(floatVector); cout << endl << "Removing..." << endl; removeEverySecond(intVector); removeEverySecond(stringVector); removeEverySecond(floatVector); system("pause"); return 0; } I get the error: binary ">>": not found an operator accepting the right operand of type "T" (or there is no acceptable conversion). Thanks in advance for your help.