title: Error:‘itoa’ was not declared in this scope
body: <p>I am getting the following error:<br>
  prog.cpp: In member function ‘void Sequence::GetSequence()’:<br>
  prog.cpp:45: error: ‘itoa’ was not declared in this scope</p>
  
  <p>I have include cstdlib header file but its not working.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;map&gt;
  #include &lt;algorithm&gt;
  #include &lt;functional&gt;
  using namespace std;
  
  template&lt;typename T&gt;
  struct predicate :
  public binary_function&lt;T, T, bool&gt;
  {
      bool operator() (const T&amp; l,const T &amp;r) const
      {
            return l &lt; r;
      }
  };
  
  class Sequence
  {
      public:
      Sequence(vector&lt;string&gt; &amp;v)
      { /* trimmed */ }
  
  void GetSequence(void)
  {
      string indices = "";
      char buf[16];
  
      for( map&lt;int, string&gt;::iterator
              i = m.begin(); i != m.end(); ++i )
      {
  indices = indices
                    + string(itoa((i-&gt;first), buf, 10));
      }
  
      SortedSequence("", indices);
  }
  
  // --- trimmed ---
  </code></pre>