On Sun, 21 Nov 2010 05:58:30 -0500, Nrgyzer <[email protected]> wrote:
Hello guys,
I have an enumeration which contains symbols of different currencies
like the following:
enum CURRENCY : wchar {
DOLLAR = '$',
EURO = '�',
YEN = ...
}
When I try to append it to a string like
char[] myString = "Currency: " ~ CURRENCY.DOLLAR
I get the following error: "Error: incompatible types for... 'char[]'
and 'int'"
I'm guessing from the code/error, this is D1. D2 does support appending
different width characters to dchar[], I'm not sure about appending wchar
to a char[] though.
I don't think D1 has such support.
It also doesn't have support for enums as strings, so I think you may just
have to create a function that returns a char[], given a wchar.
-Steve