Two dimesional vector array

Started by
1 comment, last by kuphryn 19 years, 6 months ago
Im trying to design q normal calculation system. I tried to create a two dimensional array of CVector3's on heap. But it keeps saying: 34 C:\Documents and Settings\Kris2456\My Documents\Programming\Engine\Terrain.cpp cannot convert `CVector3 (*)[2]' to `CVector3*' in I tried to declare it as this: CVector3 *PolyMap = new CVector3[1023*1023][2]; Could anyone help, i assume it will be an easy answer. Thx
------------ "Here lies a toppled God,His fall was not a small one,We but built his pedastle,A narrow, and a tall one" Frank Herbert (Dune:Messiah)
Advertisement
CVector3 (*PolyMap)[2] = new CVector3[1023*1023][2];
delete [] PolyMap;


Also consider boost::multi_array and std::vector.
Another solution is via dynamic allocation.

typedef std::vector<int> vecInt;
vecInt **x = new vecInt *[1];
x[0] = new vecInt;

Kuphryn

This topic is closed to new replies.

Advertisement