Can I output strings using core.stdc.stdio?
Godnyx
rempas at tutanota.com
Wed Dec 23 08:45:15 UTC 2020
On Wednesday, 23 December 2020 at 04:02:54 UTC, Paul Backus wrote:
> On Tuesday, 22 December 2020 at 21:26:37 UTC, Godnyx wrote:
>> On Tuesday, 22 December 2020 at 21:10:59 UTC, Godnyx wrote:
>>> Is there a way? If not then how std.stdio does it?
>>
>> I should mention that I want to use it in a variable that
>> can't be read at compile time so .toStringz is not working for
>> me.
>
> toStringz works just fine on variables that can't be read at
> compile time. You must be doing something else to trigger that
> error.
Yep and I find it out! It won't work with templates and/or
variadic function parameters. It says that the variable can't be
read at compile time (so I can't cast it) or it will work but it
will give me a segmentation fault (lol hello C). Any idea why
this is happening in those cases?
More information about the Digitalmars-d-learn
mailing list