나는 다음 코드를 컴파일하려고 : std.algorithm.joiner (string [], string) - result 요소가 char가 아니고 dchar 인 이유는 무엇입니까?
import std.algorithm;
void main()
{
string[] x = ["ab", "cd", "ef"]; // 'string' is same as 'immutable(char)[]'
string space = " ";
char z = joiner(x, space).front(); // error
}
dmd
와 컴파일 오류로 종료
test.d(8): Error: cannot implicitly convert expression (joiner(x,space).front()) of type dchar to char
가 dchar z
-char z
오류 메시지를 해결하지 변경,하지만이 나타납니다 왜 관심 처음.
왜 joiner(string[],string).front()
의 결과는 char가 아니고 dchar입니까?
는