estava rodando este programa porem acrescentei o printf mas como resolver o erro?

bash-4.4$ rdmd ex3
ex3.d(19): Error: cannot pass dynamic arrays to extern(C) vararg functions
Failed: ["dmd", "-v", "-o-", "ex3.d", "-I."]


import std.stdio;
import std.string; //strip
import core.stdc.stdio;

//more informations: http://ddili.org/ders/d.en/strings.html

void main()
{
    //char[] name;


    write("What is your name? ");
    //readln(name); //acept vector de char on input readln
//name = strip(name); //Hello String! ← no new-line character

string name = readln().strip(); // read string and no new line strip

    write("Write Hello ", name, "!\n");
    printf("Writef Hello %s!\n", name);
    writef("Writef Hello %s!\n", name);
    writeln("Writeln Hello ", name, "!");
    writefln("Writefln Hello %s!", name);
}

Reply via email to