I've been following the examples in the book and on page 8 we have this:<br><br>import std.stdio;<br>import std.string;<br><br>void main(){<br><br>     size_t[string] dictionary;<br>    foreach(line; stdin.byLine()){<br>

              foreach(word; splitter(strip(line))){<br>                          if(word in dictionary) continue;<br>                    auto newID = dictionary.length;<br>                          dictionary[word] = newID;<br>

                    writeln(newID, '\t', word);<br>            }<br>    }<br>}<br><br>With the latest GDC, which I think uses the latest 2.051, I get this error:<br>dictionary.d:12: Error: associative arrays can only be assigned values with immutable keys, not char[]<br>

<br>Someone told me on digitalmars-d.learn that it works with DMD, but I just downloaded the latest DMD that was just released and I still get the same error.  <br><br>Is there a workaround to this? and why the error?<br>