Language: C++

#include <iostream>
#include <string>

int main(void){
  std::string S,T,U;
  int A,B;
  std::cin >> S >> T;
  std::cin >> A >> B;
  std::cin >> U;
  if(U.compare(A)){
    A = A - 1;
  }else{
    B = B - 1;
  }
  std::cout << A << " " << B << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: no matching function for call to 'std::__cxx11::basic_string<char>::compare(int&)'
   10 |   if(U.compare(A)){
      |      ~~~~~~~~~^~~
In file included 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/c++/14/bits/basic_string.h:3393:7: note: candidate: 'int std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(const _CharT*) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]' (near match)
 3393 |       compare(const _CharT* __s) const _GLIBCXX_NOEXCEPT
      |       ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3393:7: note:   conversion of argument 1 would be ill-formed:
a.cc:10:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   10 |   if(U.compare(A)){
      |                ^
      |                |
      |                int
/usr/include/c++/14/bits/basic_string.h:3249:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, int> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(const _Tp&) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 3249 |         compare(const _Tp& __svt) const
      |         ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3249:9: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/14/bits/move.h:37,
                 from /usr/include/c++/14/bits/exception_ptr.h:41,
                 from /usr/include/c++/14/exception:166,
                 from /usr/include/c++/14/ios:41:
/usr/include/c++/14/type_traits: In substitution of 'template<bool _Cond, class _Tp> using std::enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = int]':
/usr/include/c++/14/bits/basic_string.h:149:8:   required by substitution of 'template<class _CharT, class _Traits, class _Alloc> template<class _Tp, class _Res> using std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv = std::enable_if_t<((bool)std::__and_<std::is_convertible<const _Tp&, std::basic_string_view<_CharT, _Traits> >, std::__not_<std::is_convertible<const _Tp*, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>*> >, std::__not_<std::is_convertible<const _Tp&, const _CharT*> > >::value), _Res> [with _Tp = int; _Res = int; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  149 |         using _If_sv = enable_if_t<
      |               ^~~~~~
/usr/include/c++/14/bits/basic_string.h:3249:2:   required by substitution of 'template<class _Tp> std::__cxx11::basic_string<char>::_If_sv<_Tp, int> std::__cxx11::basic_string<char>::compare(const _Tp&) const [with _Tp = int]'
 3249 |         compare(const _Tp& __svt) const
      |         ^~~~~~~
a.cc:10:15:   required from here
   10 |   if(U.compare(A)){
      |      ~~~~~~~~~^~~
/usr/include/c++/14/type_traits:2711:11: error: no type named 'type' in 'struct std::enable_if<false, int>'
 2711 |     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
      |           ^~~~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3274:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, int> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(size_type, size_type, const _Tp&) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 3274 |         compare(size_type __pos, size_type __n, const _Tp& __svt) const
      |         ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3274:9: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:3294:9: note: candidate: 'template<class _Tp> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_If_sv<_Tp, int> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(size_type, size_type, const _Tp&, size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 3294 |         compare(size_type __pos1, size_type __n1, const _Tp& __svt,
      |         ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3294:9: note:   candidate expects 4 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:3228:7: note: candidate: 'int std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 3228 |       compare(const basic_string& __str) const
      |       ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3228:35: note:   no known conversion for argument 1 from 'int' to 'const std::__cxx11::basic_string<char>&'
 3228 |       compare(const basic_string& __str) const
      |               ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:3325:7: note: candidate: 'int std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3325 |       compare(size_type __pos, size_type __n, const basic_string& __str) const
      |       ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3325:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:3362:7: note: candidate: 'int std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(size_type, size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3362 |       compare(size_type __pos1, size_type __n1, const basic_string& __str,
      |       ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3362:7: note:   candidate expects 5 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:3428:7: note: candidate: 'int std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(size_type, size_type, const _CharT*) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3428 |       compare(size_type __pos, size_type __n1, const _CharT* __s) const
      |       ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3428:7: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:3467:7: note: candidate: 'int std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::compare(size_type, size_type, const _CharT*, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3467 |       compare(size_type __pos, size_type __n1, const _CharT* __s,
      |       ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:3467:7: note:   candidate expects 4 arguments, 1 provided