#include #include #include using namespace std; template int search(T needle, vector haystack) { //return the position of first instance of needle in haystack int found=-1; int pos=0; while(pos animals; //the vector is empty but we can "push" as many strings as we want animals.push_back("cow"); //pushes onto the back, or end, of the vector. animals.push_back("horse"); animals.push_back("cat"); animals.push_back("mouse"); animals.push_back("dog"); animals.push_back("elephant"); animals.push_back("zebra"); cout<<"There are "<=0) { cout<<"Yes, there is a cat...I'll get rid of it\n"; animals.erase(animals.begin()+getCat); //get rid of the cat }//erase the cat cout<<" And now there are:\n"; for(int v=0;v