rt
if (fabs(a.second - b.second) <= eps) {
a[++cnt].first = make_pair(0, a.second);
a[cnt].second = make_pair(a.first, b.first);
return;
}
报错:
25 18 D:\C++\月下柠檬树.cpp [Error] no match for 'operator[]' (operand types are 'std::pair<double, double>' and 'int')
其中,a 和 cnt 的定义为:
int n, cnt;
pair<pair<double, double>, pair<double, double>> a[501];
均为全局变量