Hey everyone,
I'm trying to do something like this:
typedef void * socktag
int gensock_connect (char * hostname,
char * service,
socktag * pst)
{
int retval;
connection * conn = new connection;
if ((retval = conn->get_connected (hostname, service)))
{
gensock_close(0);
*pst = 0;
return (0);
}
*pst = conn;
return (retval);
}
So when it gets to the line *pst = conn;, *pst never gets assigned the value of conn's memory address. It stays at 0. But I have confirmed it does actually hit the line, and the address of conn is 0x...119de7610. Am I missing something?