C++ compile error c2664 ZeroMemory -
why zeromemory(&socketaddress, sizeof(connection::socketaddress));
work, doesn't?
zeromemory(&connection::socketaddress, sizeof(connection::socketaddress));
i error: error c2664: 'memset' : cannot convert parameter 1 'sockaddr_in connection::* ' 'void *'
&connection::socketaddress
member pointer. it's not pointer, way pointer particular member of class given pointer class. zeromemory
can't accept because doesn't point real memory; needs more information (a pointer instance of class containing member) before can real pointer.
take @ this question more information member pointers.
Comments
Post a Comment