Im doing an exercise where I put integers into a vector, remove them from the vector, and then display on user input. The first function with the template was an example provided by my book. the error is in the next two functions that I tried to create. I receive an error that I have illegal indirection
You have DisplayVector() already templated, why not go an extra step and overload operator<< so printing out a vector is as easy as: std::cout << vec << '\n';
Some people insist having vectors store pointers, without realizing they can get pointers with a vector's iterators.
A vector of pointers is useful in other contexts. An example is a vector of pointers to a sorted version of unsorted data. Only the pointers are rearranged by the sorting, not all the data -- useful for performance or if you needed the original data in place and a sorted copy of it to display or something.