3
我有以下聲明。gcc無法編譯名稱空間中的靜態函數
namespace test{
static cl_option* find_opt(const int &val, const cl_option *options);
}
test::cl_option* test::find_opt(const int &val, cl_option *options){}
問題是編譯時出現以下錯誤。
error: ‘test::cl_option* test::find_opt(const int&, test::cl_option*)’ should have been declared inside ‘test’
在此先感謝