You aren't using the function properly.
_itoa_s
requires 4 arguments.
This function is meant to be used with c
, for c++
you have stream.
Your code should be more like ( assuming wsaData.wVersion is a number )
char *tmpData = (char*)malloc(sizeof( char ) * 80 );
_itoa_s(wsaData.wVersion , tmpData , 80 , 10);
//_itoa_s(number to convert , target string, size of target string, number base);