Language: C++

#include <string>
#include <iostream>


using namespace std;

int main() {
    while(1){
    string data;
    cin >> data;
        if(data == "\n")break;
    //アルファベット
        if(isalpha(data)){
            if(islower(data) ) cout << toupper(data);
            else cout << tolower(data);
}
    //！アルファベット
    else{
            cout << data;
        }

    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: no matching function for call to 'isalpha(std::string&)'
   13 |         if(isalpha(data)){
      |            ~~~~~~~^~~~~~
In file included from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/locale_facets.h:2643:5: note: candidate: 'template<class _CharT> bool std::isalpha(_CharT, const locale&)'
 2643 |     isalpha(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2643:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cctype:42,
                 from /usr/include/c++/14/bits/localefwd.h:42,
                 from /usr/include/c++/14/string:45,
                 from a.cc:1:
/usr/include/ctype.h:109:1: note: candidate: 'int isalpha(int)'
  109 | __exctype (isalpha);
      | ^~~~~~~~~
/usr/include/ctype.h:109:1: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  109 | __exctype (isalpha);
      | ^~~~~~~~~
a.cc:14:23: error: no matching function for call to 'islower(std::string&)'
   14 |             if(islower(data) ) cout << toupper(data);
      |                ~~~~~~~^~~~~~
/usr/include/c++/14/bits/locale_facets.h:2637:5: note: candidate: 'template<class _CharT> bool std::islower(_CharT, const locale&)'
 2637 |     islower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2637:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/ctype.h:112:1: note: candidate: 'int islower(int)'
  112 | __exctype (islower);
      | ^~~~~~~~~
/usr/include/ctype.h:112:1: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  112 | __exctype (islower);
      | ^~~~~~~~~
a.cc:14:47: error: no matching function for call to 'toupper(std::string&)'
   14 |             if(islower(data) ) cout << toupper(data);
      |                                        ~~~~~~~^~~~~~
/usr/include/c++/14/bits/locale_facets.h:2687:5: note: candidate: 'template<class _CharT> _CharT std::toupper(_CharT, const locale&)'
 2687 |     toupper(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2687:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/ctype.h:125:12: note: candidate: 'int toupper(int)'
  125 | extern int toupper (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:125:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  125 | extern int toupper (int __c) __THROW;
      |                     ~~~~^~~
a.cc:15:33: error: no matching function for call to 'tolower(std::string&)'
   15 |             else cout << tolower(data);
      |                          ~~~~~~~^~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note: candidate: 'template<class _CharT> _CharT std::tolower(_CharT, const locale&)'
 2693 |     tolower(_CharT __c, const locale& __loc)
      |     ^~~~~~~
/usr/include/c++/14/bits/locale_facets.h:2693:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/ctype.h:122:12: note: candidate: 'int tolower(int)'
  122 | extern int tolower (int __c) __THROW;
      |            ^~~~~~~
/usr/include/ctype.h:122:25: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int'
  122 | extern int tolower (int __c) __THROW;
      |                     ~~~~^~~