Hi,

I'm new to D so can someone explain to me what is happening here?


void func(const char* s, char** e) {
    import core.stdc.stdlib;
    auto result = strtod(s, e);
}

Error: function core.stdc.stdlib.strtod (scope inout(char)* nptr, scope inout(char)** endptr) is not callable using argument types (const(char*), char**)

I've found I have to use the following:

void func(inout (char)* s, inout(char)** e)


I thought inout was supposed to take const or non-const variants, so expected the original const char* s to work.

Thanks,
Norm

Reply via email to