I\'m trying to pass a const char * to an old C library converted from a Swift string in Swift.
This is the C function I\'m calling:
artnet_node artne
You didn't specify what your Swift array contains. In any case, you need to convert your Swift array to an array of Int8:
Int8
let str = "Hello world" let cArray = str.cString(using: .utf8) artnet_new(cArray, 1)