Vector does not name a type

I am trying to make a class where it will take in a text file of coordinates and find the perimeter of the shape. When i compile this section of code i get an error saying vector does not name a type.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
#include <vector>

class Shape{

    private:
        vector<int>points;
        int size =0;
        vector<int>coordinate;
    public:
        void addPoint(int);
        void getPoint(int);
        int getNumPoints(void);

};
Last edited on
vector is part of the std namespace.

Change to std::vector<int> ...
Topic archived. No new replies allowed.