How to convert an IP address array to SocketAddress

This does not work when using set_network(). I get an error message
no suitable conversion function from “SocketAddress” to “const char *” exists

#include <mbed.h>
#include "EthernetInterface.h"

EthernetInterface eth;

uint8_t ip[4] = {10, 101, 1, 201};
uint8_t subnet[4] = {255, 255, 0, 0};
uint8_t gateway[4] = {0, 0, 0, 0};

SocketAddress IP(ip, NSAPI_IPv4);
SocketAddress SUBNET(subnet, NSAPI_IPv4);
SocketAddress GATEWAY(gateway, NSAPI_IPv4);

int main() {
  eth.set_network(IP, SUBNET, GATEWAY);
  eth.connect();

  while(1) {
  }
}