读书人

static int ( amp;Init())[100]//尼玛这是

发布时间: 2013-07-01 12:33:04 作者: rapoo

static int ( &Init())[100]//尼玛这是函数啊?????



class Test
{
static const int (&m)[100];
static int ( &Init())[100]
{
static int a[100];
for( int i = 0 ; i <100 ; i ++)
{
a[i] = i*i;
}
return a;
}
};
const int (&Test::m)[100] = Test::Init();

[解决办法]
引用:
大哥typedef int INT_ARRAY_100[100];// INT_ARRAY_100[100]代表int类型????? 还是INT_ARRAY_100代表int类型??????


INT_ARRAY_100 代表 int[100] 类型

读书人网 >C++

热点推荐