On Monday, 21 December 2015 at 02:03:14 UTC, Shriramana Sharma wrote:
I'm trying to interface to a C function:

extern(C) const char * textAttrN(const char * specString, size_t n);

and getting the error:

Error: function <src>.textAttrN without 'this' cannot be const

Please advise as to what I'm doing wrong?! :-(

Change it to:

extern(C) const(char)* textAttrN(const char * specString, size_t n);
               ^    ^

Reply via email to