I am having serious trouble passing a string from swift, to a function written in c.
I'm trying to do this in my swift code
var address = "192.168.1.2"
var port = 8888
initSocket(address, port)
The c function looks like this:
void initSocket(char *address, int port);
Im getting the error: Cannot convert the expression's of type 'Void' to type 'CMutablePointer'
I can't seem to find a solution that works.
const char*
argument on C side it would work seamlessly. – ConnelleyinitSocket(const char* address)
and string declaration to `var address: CString = "192.168.1.2" Thanks again! – Cy