How do I convert from char
to const char
? How do I implement type casting without changing the char SendBuf
? Here is my code:
.cpp
// main()
char SendBuf[6] = "Hello";
sendto(..., SendBuf, ...);
// sendto structure
int sendto(
__in SOCKET s,
__in const char *buf,
__in int len,
__in int flags,
__in const struct sockaddr *to,
__in int tolen
);
Error
Error 1 error C2440: '=' : cannot convert from 'const char [6]' to 'char [6]'
Thank you.