title: Where is strchr in C++?
body: <p>I know that <code>strchr</code> is in <code>&lt;string&gt;</code>.
  But the <strong>uva10082</strong> gave the CE:</p>
  
  <pre><code>code.cpp: In function ‘int main()’:
  code.cpp:6:13: warning: unknown escape sequence: '\A'
  char x[] = "`1234567890-=QWERTYUIOP[]\ASDFGHJKL;'ZXCVBNM,./";          ^
  code.cpp:11:24: error: ‘strchr’ was not declared in this scope
  p = strchr(x, char(c));
  </code></pre>
  
  <p>here is my code:(use c++11 to compile)</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;string&gt;
  using namespace std;
  int main()
  {
      char x[] = "`1234567890-=QWERTYUIOP[]\ASDFGHJKL;'ZXCVBNM,./";
      int c;
      char* p = NULL;
      while ((c = getchar()) != EOF)
      {
          p =strchr(x,char(c));
          if (p)
              cout &lt;&lt; *(p-1);
          else
              cout &lt;&lt; char(c);
      }
  }
  </code></pre>