On Tuesday, 22 October 2013 at 15:05:16 UTC, Adam D. Ruppe wrote:
On Tuesday, 22 October 2013 at 15:01:20 UTC, Agustin wrote:
= "public immutable(int) getId() const { \n" ~ id ~ ";
\n}";
You'll probably want to convert id to a string there
import std.conv;
"public immutable(int) getId() const { \n" ~ to!string(id) ~ ";
and also put in return for that function:
"public immutable(int) getId() const { \n return " ~
to!string(id) ~ ";
and it should compile. What was happening before is string ~
int implicitly converts the int to a char, and cast(char)(3)
isn't a printable character, and isn't allowed in D source code.
Works great, thanks! :)