I need to store an indeterminable number of triangles in a vector, therefore, it would be something like:
std::vector<Point[3]>
But that is not valid C++98. What are other solutions that do not involve a triangle struct?
Thanks
Try a boost::array<Point, 3>
. That should do the necessities.
struct
pair<pair<Point,Point>,Point>
typestd::tuple
. If there are more of such cases, you may implement your own tuple
class taking 3 or more types.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.