//...
#include <vector>
#include <Vector3.h>
//...
private:
std::vector<Mathlib::Vector3<float>> controlPoints; // Doesn't work
public:
void addPoint(Mathlib::Vector3<float> vector); // Works
Edit: I have to allocate it somehow?
[edited by - __fold on October 8, 2003 5:48:54 AM]
std::vector + namespace + template problem
Is it possible to use templates in a std::vector?
I have this piece of code.
Your solution should work, except that you need to put a space between the right angle brackets, to discern it from the right bitwise shift operator. Like this:
std::vector<Mathlib::Vector3<float> > controlPoints; // Does work
You have to put spaces between two >. So this should work:
std::vector<Mathlib::Vector3<float> > controlPoints;
[edited by - EL on October 8, 2003 5:58:08 AM]
std::vector<Mathlib::Vector3<float> > controlPoints;
[edited by - EL on October 8, 2003 5:58:08 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement