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,

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, if it is not found it returns a -1... i only am getting -1 returned, how can I fix this function?? Thanks!!  Working in c++, below I have a function that searches a

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!