I have a problem with C++ vectors. I’ve included my code below.Its an insertion sort program that has to be done on the copy ofthe vector which I have in the “vectorCopy” found in Words.cpp. Thecode only works when insertion sort is in Words.cpp but I need toseparate the insertion sort(as well as other sorting algorithms).Where does the vectorCopy need to be go so that Words.cpp andInsertion.cpp (and other ones I need to write up) can have accessto it? I tried to put it in Words.h but it didn’t work. Pleasehelp.
Words.h
#pragma once
#include
#include
#include
#include
#include
using namespace std;
class Words
{
vector vector;
//vector vectorCopy; // Doesn’t work
OR
OR