I have a server and a client program written and I have a struct named JCPPM that is the struct that holds my packet of data I send between the program. I have this code in my server program:
Obviously the declared instance of my JCPPM struct is JCPPpacket. This particular case I'm trying to receive a packet of the exact same setup(even same naming system since client and server have been written by me). The ConsoleMessage function is my custom function and no errors arise from that so don't worry about that. Up further I have this code:
recv((SOCKET)wParam,(struct JCPPM *)&JCPPpacket,sizeof(struct
And I probably have given more info than needed BUT I get this error on my recv function:
unsigned int type;
struct JCPPM JCPPpacket;
A typecasting error that I didn't expect. I thought the recv function took any kind of type to receive to. Anybody know what's my problem? Thanks.
132 C:\WINDOWS\Desktop\JCPPChat\main.cpp cannot convert `JCPPM*' to `char*' for argument `2' to `int recv(SOCKET, char*, int, int)'