|
-
April 21st, 2010, 11:54 AM
#1
Curiosity about "template-ready" containers
I read that a "template-ready" class must include a default constructor, a copy constructor and a = operator overload (information taken from http://www.codeproject.com/KB/stl/Pr...lGuideStl.aspx)
But I have used this class:
class MyPoint
{
public:
//! Coordinates of the point
float x,y;
//! Data
float data[90];
};
as a container (a defined type to be used in declarations like vector <MyPoint> m_var) without problems.
Why is that?
Maybe just if I wanted to make a complete class (with = operator support and things like that) I had to declare it in that way?
Just a doubt though
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|