how to return array from function in c++ code example Example: return array of string in function c++ delete[] names;