fork(1) download
  1. #include <string>
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6. std::wstring newwd;
  7. setlocale(LC_ALL, "");
  8. std::wcout << "Enter greek word ";
  9. std::wstring wordgr;
  10. std::getline(std::wcin, wordgr);
  11. std::wcout << "The word is " << wordgr << "." << std::endl;
  12. newwd=wordgr.substr(2,1) ;
  13. std::wcout << "3rd letter is " << wordgr.substr(2,1) << " <" << std::endl;
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5064KB
stdin
χωριάτικη
stdout
Enter greek word The word is χωριάτικη.
3rd letter is ρ <