Question: Working in c++, below I have a function that searches a char array for a name, and then it returns the index of that array,
110 This function will search for the name in the array shipNamesI]. It will 111 return a -1 if it is not found, and the index of the spaceship name in /I in the array if it is found. // params : (in, in,.in) 113 115 gint Find(const string shipNames[], int numships, string name) 116 118 int i "p; while (i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
