Passing variadic arguments to C

Foo via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Feb 22 09:20:21 PST 2015


On Sunday, 22 February 2015 at 17:15:06 UTC, anonymous wrote:
> On Sunday, 22 February 2015 at 17:09:27 UTC, Foo wrote:
>> Is this possible?
>>
>> Example:
>> ----
>> void foo(Args...)(auto ref Args args) {
>>    sprintf(str.ptr, fmt.ptr, args);
>> }
>> ----
>
> yes

I get the error, that I cannot pass a dynamic array to a C 
function.


More information about the Digitalmars-d-learn mailing list