#include <iostream>
#include <string>
#include <vector>
using namespace std;
/*返回數組指針或者引用的4種方法*/
/*返回數組指針,方法1,類型別名*/
using arryS = string[10];
arryS& func1();
/*返回數組指針,方法2,聲明函數(較爲繁瑣,不易理解)*/
string(&func2())[10];
/*返回數組指針,方法3,尾置返回類型*/
auto func()->string(&)[10];
/*返回數組指針,方法4,使用decltype(已知返回數組指針指向那個數組)*/
string test[10] = { "a", "b", "c" };
decltype(test) &func();
4種聲明返回數組指針函數的方法,其中第2個方法較爲繁瑣,不易理解,不推薦。