Language: C++

#include <iostream>
#include <algorithm>
#include <string>

int main() {
    std::string s1,s2;
    int n = 0;
    std::cin >> s1;
        
    while(std::cin >> s2){
        if(s2 == "END_OF_TEXT")
            break;
        if(std::equal(s1, s2))
            n++;
    }
    std::cout << n << std::endl;
      
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: no matching function for call to 'equal(std::string&, std::string&)'
   13 |         if(std::equal(s1, s2))
      |            ~~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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/c++/14/bits/stl_algobase.h:1582:5: note: candidate: 'template<class _II1, class _II2> bool std::equal(_II1, _II1, _II2)'
 1582 |     equal(_II1 __first1, _II1 __last1, _II2 __first2)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1582:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/bits/stl_algobase.h:1613:5: note: candidate: 'template<class _IIter1, class _IIter2, class _BinaryPredicate> bool std::equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate)'
 1613 |     equal(_IIter1 __first1, _IIter1 __last1,
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1613:5: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/stl_algobase.h:1704:5: note: candidate: 'template<class _II1, class _II2> bool std::equal(_II1, _II1, _II2, _II2)'
 1704 |     equal(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1704:5: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/bits/stl_algobase.h:1737:5: note: candidate: 'template<class _IIter1, class _IIter2, class _BinaryPredicate> bool std::equal(_IIter1, _IIter1, _IIter2, _IIter2, _BinaryPredicate)'
 1737 |     equal(_IIter1 __first1, _IIter1 __last1,
      |     ^~~~~
/usr/include/c++/14/bits/stl_algobase.h:1737:5: note:   candidate expects 5 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:333:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> std::equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _BinaryPredicate)'
  333 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:333:1: note:   candidate expects 5 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:338:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> std::equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2)'
  338 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2);
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:338:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:342:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> std::equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate)'
  342 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:342:1: note:   candidate expects 6 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:347:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterator2> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, bool> std::equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2)'
  347 | equal(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:347:1: note:   candidate expects 5 arguments, 2 provided