Language: C++

#include <bits/stdc++.h>
#include <complex>
#define MAX_N 20
using namespace std;
typedef complex<double> P;
P data[MAX_N];

double distance(P a, P b) {
    double diffx = b.real()-a.real(), diffy = b.imag()-a.imag();
    return(sqrt(diffx*diffx+diffy*diffy));
}

double areaOfTriangle(P a, P b, P c) {
    double ret;
    double A = distance(a,b),B = distance(b,c),C = distance(c,a);
    double z = (A+B+C)/2.0;
    ret = sqrt(z*(z-A)*(z-B)*(z-C));
    return(ret);
}

void solve(int len) {
    double S = 0.0;
    for(int r = 1; r < len-1; r++) {
        S += areaOfTriangle(data[0], data[r], data[r+1]);
    }
    printf("%.6f\n", S);
}

int main(void) {
    double x, y;
    int idx = 0;
    while(scanf("%lf,%lf", &x,&y) != EOF) {
        data[idx++] = P(x, y);
    }
    solve(idx);
    return(0);
}

Compiler output:
a.cc: In function 'void solve(int)':
a.cc:24:29: error: reference to 'data' is ambiguous
   24 |         S += areaOfTriangle(data[0], data[r], data[r+1]);
      |                             ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:3: note:                 'P data [20]'
    6 | P data[MAX_N];
      |   ^~~~
a.cc:24:38: error: reference to 'data' is ambiguous
   24 |         S += areaOfTriangle(data[0], data[r], data[r+1]);
      |                                      ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:3: note:                 'P data [20]'
    6 | P data[MAX_N];
      |   ^~~~
a.cc:24:47: error: reference to 'data' is ambiguous
   24 |         S += areaOfTriangle(data[0], data[r], data[r+1]);
      |                                               ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:3: note:                 'P data [20]'
    6 | P data[MAX_N];
      |   ^~~~
a.cc: In function 'int main()':
a.cc:33:9: error: reference to 'data' is ambiguous
   33 |         data[idx++] = P(x, y);
      |         ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:3: note:                 'P data [20]'
    6 | P data[MAX_N];
      |   ^~~~