Language: C++

#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
int       stoi( const std::string& str, size_t *pos = 0, int base = 10 )
{
    return std::strtol(str.c_str(), pos, base);
}
struct triangle
{
    triangle() { leg1 = leg2 = leg3 = 0; }
    bool isHyp()
    {
        if (leg1*leg1 + leg2*leg2 == leg3*leg3 || leg2*leg2 + leg3*leg3 == leg1*leg1 || leg3*leg3 + leg1*leg1 == leg2*leg2)
            return true;
        return false;
    }
    int leg1;
    int leg2;
    int leg3;
};
int main()
{
    int j;
    cin >> j;
    triangle* triData = new triangle[j];
    bool* results = new bool[j];
    string s;
    for (int i = 0; i < j; i++)
    {
        getline(cin, s, ' ');
        triData[i].leg1 = stoi(s);
        s.clear();
        getline(cin, s, ' ');
        triData[i].leg2 = stoi(s);
        s.clear();
        getline(cin, s);
        triData[i].leg3 = stoi(s);
        results[i] = triData[i].isHyp();
    }
    for (int i = 0; i < j; i++)
    {
        cout << (results[i] ? "YES" : "NO") << endl;
    }
    
    
    
    delete [] results;
    delete [] triData;
}

Compiler output:
a.cc: In function 'int stoi(const std::string&, size_t*, int)':
a.cc:7:37: error: cannot convert 'size_t*' {aka 'long unsigned int*'} to 'char**'
    7 |     return std::strtol(str.c_str(), pos, base);
      |                                     ^~~
      |                                     |
      |                                     size_t* {aka long unsigned int*}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:178:43: note:   initializing argument 2 of 'long int strtol(const char*, char**, int)'
  178 |                         char **__restrict __endptr, int __base)
      |                         ~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc: In function 'int main()':
a.cc:32:31: error: call of overloaded 'stoi(std::string&)' is ambiguous
   32 |         triData[i].leg1 = stoi(s);
      |                           ~~~~^~~
a.cc:5:11: note: candidate: 'int stoi(const std::string&, size_t*, int)'
    5 | int       stoi( const std::string& str, size_t *pos = 0, int base = 10 )
      |           ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
a.cc:35:31: error: call of overloaded 'stoi(std::string&)' is ambiguous
   35 |         triData[i].leg2 = stoi(s);
      |                           ~~~~^~~
a.cc:5:11: note: candidate: 'int stoi(const std::string&, size_t*, int)'
    5 | int       stoi( const std::string& str, size_t *pos = 0, int base = 10 )
      |           ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
a.cc:38:31: error: call of overloaded 'stoi(std::string&)' is ambiguous
   38 |         triData[i].leg3 = stoi(s);
      |                           ~~~~^~~
a.cc:5:11: note: candidate: 'int stoi(const std::string&, size_t*, int)'
    5 | int       stoi( const std::string& str, size_t *pos = 0, int base = 10 )
      |           ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~