123456789101112131415161718192021222324252627282930313233343536// compile with: g++ hello.cpp#include<iostream>#include<string>#include<vector>using namespace std;// class is like struct... but// - classes have methods - functions that run on the object// - classes can make their data privateclass myData {private:int x, y;public:myData(int n1, int n2) {x = n1; y = n2;}myData() {x = y = 0;}int getX() const {return x;}void setX(int n) {x = n;}int getY() const {return y;}