Visual Studio 2017, код c ++, точка-координата города;work_type = float или double
#include <cstdio>
#include <iostream>
#include <vector>
#include <set>
#include <cmath>
#include <algorithm>
#define work_type double
using namespace std;
//n <= 5 000
//-10 000 <= x, y <= 10 000
const int MAXN = 5000;
struct point {
int x;
int y;
point operator-(point& b) {
point out = { x - b.x, y - b.y };
return out;
}
};
work_type dist(point& a, point& b) {
return sqrt(work_type(pow((a - b).x, 2) + pow((a - b).y, 2)));
}
point points[MAXN];
int main(){...}
Visual Studio сообщает, что MAXN не объявлен в строке.где я создаю массивные структуры.Я не могу понять, почему это