我正在尝试在我的类构造函数中初始化指向结构数组的指针,但它根本不起作用......
class Particles {
private:
struct Particle {
double x, y, z, vx, vy, vz;
};
Particle * parts[];
public:
Particles (int count)
{
parts = new Particle [count]; // < here is problem
}
};