所以......你不能做一个引用数组,但你能建立一个处理引用、指针和值的集合吗?
Collection<Integer32*> a;
Collection<Integer32&> b;
Collection<Integer32> c;
这是我遇到的问题:
template <class ItemType> class Collection
{
public:
Collection(ItemType array[]); // or ItemType*, doesnt matter
protected:
ItemType* innerArray;
};
编译器说不,没有指向引用的指针......可能吗?