i want to return a string array so i can use it in my main function. how do i do this?
#include <iostream>
#include <string>
using namespace std;
string test()
{
string a[5] = {"Hello","World","How","Are","You"};
return a;
}
int main()
{
string b[5];
b=test();
for(int i=0;i<5;i++)
cout << b[i] << endl;
return 0;
}