Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string c;
  getline(c); // 変数sで入力を一行受け取る
  
  if (c = "a") {
    cout << "vowel" << endl;
  }
  else if (c = "e") {
    cout << "vowel" << endl;
  }
  else if (c = "i") {
    cout << "vowel" << endl;
  }
  else if (c = "o") {
    cout << "vowel" << endl;
  }
  else if (c = "u") {
    cout << "vowel" << endl;
  }
    
  else {
    cout << "consonant" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: no matching function for call to 'getline(std::string&)'
    6 |   getline(c); // 変数sで入力を一行受け取る
      |   ~~~~~~~^~~
In file included from /usr/include/c++/14/string:55,
                 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/basic_string.tcc:907:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
  907 |     getline(basic_istream<_CharT, _Traits>& __in,
      |     ^~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:907:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:4117:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 4117 |     getline(basic_istream<_CharT, _Traits>& __is,
      |     ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4117:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:4125:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&, _CharT)'
 4125 |     getline(basic_istream<_CharT, _Traits>&& __is,
      |     ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4125:5: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/14/bits/basic_string.h:4132:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::getline(basic_istream<_CharT, _Traits>&&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
 4132 |     getline(basic_istream<_CharT, _Traits>&& __is,
      |     ^~~~~~~
/usr/include/c++/14/bits/basic_string.h:4132:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154:
/usr/include/stdio.h:697:18: note: candidate: '__ssize_t getline(char**, size_t*, FILE*)'
  697 | extern __ssize_t getline (char **__restrict __lineptr,
      |                  ^~~~~~~
/usr/include/stdio.h:697:18: note:   candidate expects 3 arguments, 1 provided
a.cc:8:9: error: could not convert 'c.std::__cxx11::basic_string<char>::operator=(((const char*)"a"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    8 |   if (c = "a") {
      |       ~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:11:14: error: could not convert 'c.std::__cxx11::basic_string<char>::operator=(((const char*)"e"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 |   else if (c = "e") {
      |            ~~^~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:14:14: error: could not convert 'c.std::__cxx11::basic_string<char>::operator=(((const char*)"i"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |   else if (c = "i") {
      |            ~~^~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:17:14: error: could not convert 'c.std::__cxx11::basic_string<char>::operator=(((const char*)"o"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   17 |   else if (c = "o") {
      |            ~~^~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:20:14: error: could not convert 'c.std::__cxx11::basic_string<char>::operator=(((const char*)"u"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   20 |   else if (c = "u") {
      |            ~~^~~~~
      |              |
      |              std::__cxx11::basic_string<char>