I'm getting an unhelpful linker error, what've I got wrong?
pineapple via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Oct 28 04:48:26 PDT 2015
On Wednesday, 28 October 2015 at 11:40:14 UTC, tcak wrote:
> The "writebuffer" is defined to take an array as parameter.
> Yet, you are passing a pointer and a length to it. Instead,
> pass the parameter "str" to it directly. Also, you do not have
> to put "!char" to there. Compiler will solve it out by itself.
There's also a writebuffer method in the interface with this
signature, though:
streamint writebuffer(T)(in T* buffer, in streamint count);
And regardless, changing the problematic code to this doesn't
address the linker error:
final streamint writestring(in char[] str){
return this.writebuffer(str);
}
final streamint writestring(in string str){
return this.writebuffer(str);
}
More information about the Digitalmars-d-learn
mailing list