Is it possible to create an object of a class, inside a class definition, without using default constructor?
class Vector3D {
public:
Vector3D(int x, int y, int z);
virtual ~Vector3D();
private:
int m_X;
int m_y;
int m_z;
};
class CustomClass {
private:
Vector3D m_Vec(50,50,50); //error
};
Yes, this can be done, but the syntax is different: