📜  在函数c ++代码示例中返回字符串数组

📅  最后修改于: 2022-03-11 14:44:52.953000             🧑  作者: Mango

代码示例1
string* getNames() {
 string* names = new string[3];
 names[0] = "Simon";
 names[1] = "Peter";
 names[2] = "Dave"; 

 return names;
}