In this code, v is a std::vector, which has no member x. But the vector is filled with objects which do have a member x.
Not entirely sure what your code is supposed to be but this set x of elements in the vector...
1 2 3 4 5 6 7
|
// storage for the new vector class
vector<IntegerCoordinate> v;
public:
// constructor
// functions
void set_x(unsigned x) { v[i++].X = x; }
void set_y(unsigned y) { v[i++].Y = y;
|
Last edited on
Basically, what I'm trying to do is create a vector v filled with IntegerCoordinates.
But I'd like to be able to change the values of the IntegerCoordinates, and change them. So I'm assuming I've done this completely wrong...?