1. #include <string>
  2. #include <iostream>
  3.  
  4.  
  5. int main(){
  6. std::string test = "test string";
  7.  
  8.  
  9. typedef std::string::iterator iter_type;
  10. for (iter_type it = test.begin(); it != test.end(); ++it){
  11. switch (*it){
  12. case 'a' : case 'i': case 'u':case 'e': case 'o': std::cout << " vocal " << *it;
  13. default :std::cout << " konsonan " << *it;
  14. }
  15. }
  16. }