title: Using an array as key in map C ++
body: <p>Basically, I need to find all matching anagrams to a word. What I was doing was using an array of size 26 to represent the letters in a word.
  Ex:</p>
  <pre><code>abcdefg={1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
  aaaaaaa={7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
  </code></pre>
  <p>This is how I'm creating the array.</p>
  <pre><code>//stringtemp is a C++ string representing the word.
  //letters is a size 26 int array representing all the letters in the string.
  for(int i=0;i&lt;stringtemp.length();i++)
  {
      letters[stringtemp[i]-65]+=1;
  }
  </code></pre>
  <p>And this is how I'm storing the array in the map.</p>
  <pre><code>dictionary[letters].push_back(stringtemp);
  </code></pre>
  <p>So, am I doing something wrong or is this impossible in C++. In all the other answers I found, they suggested to use a vector as the key, but that won't work in my case(I think.)</p>