Original Post
Hello, I have somewhat of a problem and no idea how this is done or even if it's possible. But this is what I have:
class Plane3
{
public:
inline
Plane3(const Point3 &p0,
const Point3 &p1,
const Point3 &p2);
...
private:
Point3 mP[3];
};
What I want to do is initialize the mP array member in the constructor. Something like this:
inline
Plane3:: Plane3(const Point3 &p0,
const Point3 &p1,
const Point3 &p2)
: mP[0](p0), mP[1](p1), mP[2](p2)
{
}
Of course this isn't valid code so my question is what syntax can you use when initializing array member objects when constructing an object? Having three separate member variables and initializing them isn't acceptable, I need it to be an array.
Thanks!
*edit*
Damn smilies.
[edited by - asp_ on June 10, 2004 5:51:47 AM]