I'm quite new to c++, more experienced with Java, so I don't fully understand c++ variable declaration and pointers.
That being said I'm trying to connect a socket to a server, for which I need to use getaddrinfo() to get the address and I have defined(there are numbers in place of x's):
const char* ipAddress = "xx.xx.xx.xxx";
const char* port = "xxxx";
const struct addrinfo *hints, *res;
(I only added the consts because I thought it might fix my problem)
However when I try to call
int result = getaddrinfo(ipAddress,port,NULL,res);
I get the error "No matching function for call to getaddrinfo()".
What am I doing wrong here?