title: 'std::string' has no member named 'front'
body: <pre><code>#include &lt;string&gt;
  #include &lt;algorithm&gt;
  #include &lt;iostream&gt;
  
  int main()
  {
      string str;
      string str1;
      int h = 0;
      cin &gt;&gt; str;
      if (str.length() &gt; 10)
      {
          str1 += str.front();
          h = str.length() - 2;
          string s = to_string(h);
          str1 += s;
          str1 += str.back();
          cout &lt;&lt; str1;
      }
      else cout &lt;&lt; str;
      return 0;
  }
  </code></pre>
  
  <p>compiles in XCode, but doesn`t on codeforces.ru/</p>
  
  <pre><code> сan't compile program.cpp:
  program.cpp: In function 'int main()':
  program.cpp:23:21: error: 'std::string' has no member named 'front'
  program.cpp:27:29: error: 'to_string' was not declared in this scope
  program.cpp:32:21: error: 'std::string' has no member named 'back'
  </code></pre>