fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const string str1 = "abcd";
  5. const string str2 = "фбвг";
  6.  
  7.  
  8. int main()
  9. {
  10. cout << str1 << " - " << str1.size() << " - " << str1[2] << endl ;
  11. cout << str2 << " - " << str2.size() << endl ;
  12.  
  13.  
  14. return 0;
  15. }
  16.  
  17.  
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
abcd - 4 - c
фбвг - 8