Function overloading is a process of creating several functions with the same name, but different parameters.
In overloaded variants of a function, the number of arguments or their type must be different. A specific function variant is selected based on the correspondence of the list of arguments when calling the function, to the list of parameters in the function declaration.
string a[] = {"one", "1st", "two", "2nd"}; string b[][2] = {{"one", "1st"}, {"two", "2nd"}}; } //+------------------------------------------------------------------+ //| Search for a value in an array of strings. | //| @param &arr: array of strings | //| @param str: the value to look for | //| @return idx: the position of the value in the array | //+------------------------------------------------------------------+ int array_string_search(string &arr[], string str) { int idx = -1; if (str == arr[i]) { idx = i; break; } } return(idx); } int array_string_search(string &arr[][2], string str) { int idx = -1; if (str == arr[i][0]) { idx = i; break; } } return(idx); }