To connect to a server installation, you must first set the hostname. You may include a port number if the server is listening on a non-standard port, and you may also set the network timeout. After setting these values, call the connect function and check the result to initiate a session with the server:
AddHost(&myServer, "localhost");
if (!Connect(&myServer))
{
cout << "Error connecting to server: "
<< getLastError(&myServer)
<< endl;
return -1;
}