Language: C++


#include<string>
int main(){
std::string c;
std::cin >> c;
if(c=="o"){
std::cout << "vowel" <<std::endl;
        }
 else if(c=="u"){
std::cout << "vowel" <<std::endl;
}
 else if(c=="i"){
std::cout << "vowel" <<std::endl;
    }
     else if(c=="e"){
std::cout << "vowel" <<std::endl;
}
 else if(c=="a"){
std::cout << "vowel" <<std::endl;
}
else {
std::cout << "consonant" << std::endl;
}
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: 'cin' is not a member of 'std'
    5 | std::cin >> c;
      |      ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<string>
  +++ |+#include <iostream>
    3 | int main(){
a.cc:7:6: error: 'cout' is not a member of 'std'
    7 | std::cout << "vowel" <<std::endl;
      |      ^~~~
a.cc:7:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:29: error: 'endl' is not a member of 'std'
    7 | std::cout << "vowel" <<std::endl;
      |                             ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<string>
  +++ |+#include <ostream>
    3 | int main(){
a.cc:10:6: error: 'cout' is not a member of 'std'
   10 | std::cout << "vowel" <<std::endl;
      |      ^~~~
a.cc:10:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:29: error: 'endl' is not a member of 'std'
   10 | std::cout << "vowel" <<std::endl;
      |                             ^~~~
a.cc:10:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:13:6: error: 'cout' is not a member of 'std'
   13 | std::cout << "vowel" <<std::endl;
      |      ^~~~
a.cc:13:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:29: error: 'endl' is not a member of 'std'
   13 | std::cout << "vowel" <<std::endl;
      |                             ^~~~
a.cc:13:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:16:6: error: 'cout' is not a member of 'std'
   16 | std::cout << "vowel" <<std::endl;
      |      ^~~~
a.cc:16:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:29: error: 'endl' is not a member of 'std'
   16 | std::cout << "vowel" <<std::endl;
      |                             ^~~~
a.cc:16:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:19:6: error: 'cout' is not a member of 'std'
   19 | std::cout << "vowel" <<std::endl;
      |      ^~~~
a.cc:19:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:29: error: 'endl' is not a member of 'std'
   19 | std::cout << "vowel" <<std::endl;
      |                             ^~~~
a.cc:19:29: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:22:6: error: 'cout' is not a member of 'std'
   22 | std::cout << "consonant" << std::endl;
      |      ^~~~
a.cc:22:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:34: error: 'endl' is not a member of 'std'
   22 | std::cout << "consonant" << std::endl;
      |                                  ^~~~
a.cc:22:34: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'