April 03, 2011 Trying to compile sample from The D Programming Language book. | ||||
---|---|---|---|---|
| ||||
Attachments:
| Hello, I am completely stuck on this error, any help would be appreciated... google was not helpful (too many useless matches for "D <error>"). I am trying to compile this: import std.string, std.algorithm, std.conv, std.ctype, std.regex, std.range, std.stdio; // blah blah blah auto words = split(sentence, regex("[ \t,.;:?]+")); // blah blah blah and two compilers (gdc, dmd) are giving me this error (output from gdc): main.d:34: Error: std.string.split at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/d2/4.5.1/std/string.d:69 conflicts with std.regex.split(String) at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.1/../../../../include/d2/4.5.1/std/regex.d:3096 And I am clueless. How can they conflict, it's the standard library. It must be in the usage of split. As this is the second or third example in chapter one, I have no clue what is going on. Thanks! |
Copyright © 1999-2021 by the D Language Foundation