Write a templated class named “EveryOther” that behaves much like std::vector (in the file named “everyother.h”). It has a member function called “push_back”, but only every other call to the member function actually does anything (actually pushed the element to the end of the structure). The class should have a default constructor and a constructor that takes an initializer list (be sure that you only add every other element). The other function that EveryOther needs to support is the operator<<, see the test cases for formating.
This class is templated so that instances like EveryOther<char> and EveryOther<vector<int>> are supported.
Input for testing the constructor:
#include<string>
EveryOther<char> eo_1;
EveryOther<std::string> eo_2 {“include”,”don’t”,”keep”,”leave”};
filename: everyother.h
filename: main.cpp
Output EveryOther(include, keep, )