【发布时间】:2013-12-10 21:29:53
【问题描述】:
我有无法编译的代码
import std.string;
import std.net.curl;
int main(string[] argv)
{
string a = get("http://google.com");
return 0;
}
Error: cannot implicitly convert expression (get("http://google.com", AutoProtocol())) of type char[] to string
在http://dlang.org/phobos/std_net_curl.html 中有代码
import std.net.curl, std.stdio;
// Return a string containing the content specified by an URL
string content = get("dlang.org");
为什么我不能编译相同的代码?
【问题讨论】:
标签: d