Baffled by compilation error for formattedRead

PhilipDaniels via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 7 16:13:37 PDT 2015


On Thursday, 7 May 2015 at 23:10:26 UTC, PhilipDaniels wrote:

Let's try reformatting that...

ubyte r, g, b;

// does not compile
auto numRead = formattedRead(dropExactly(input, 4), "%x/%x/%x", 
&r, &g, &b);
// does not compile
auto numRead = formattedRead(input[4..$], "%x/%x/%x", &r, &g, &b);

// compiles
string s2 = input[4..$];
auto numRead = formattedRead(s2, "%x/%x/%x", &r, &g, &b);



More information about the Digitalmars-d-learn mailing list