In C++, write a method called findMatch that returns the position of a string in the array that is equal to

Return the position of a string in the array that is equal to ; if there is more than one such string, return the smallest position number of such a matching string. Return −1 if there is no such string.

string d[9] = {
"charlie", "novembe", "alpha", "alpha", "kilo", "kilo", "kilo", "alpha", "alpha"
};
int m = findMatch(d, 9, "kilo"); // returns 4…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store