Thanks all, I have gotten an answer of this problem, Sorry for
this non java question again.

Thanks.

The answer as following,

class test
{
private:
         int _a[3];
public:
         const int (&a)[3];
public:
        test(const int x[3]);
        ~test();
};

test::test(const int x[]) :
        a(_a)
{
        for(unsigned i = 0; i < sizeof(a) / sizeof(a[0]); i++)
                _a[i] = x[i];
}

test::~test()
{
}

...

int x[3] = {1, 2, 3};
test atest(x);

Reply via email to