定义的参数
SOCKET s;
unsigned char testbuf[0x10000];
unsigned char buf[1000]; send(s,testbuf,len,0);
recv(s,buf,1000,0);VC6.0下提示
error C2664: 'send' : cannot convert parameter 2 from 'unsigned char [65536]' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
error C2664: 'recv' : cannot convert parameter 2 from 'unsigned char [1000]' to 'char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
SOCKET s;
unsigned char testbuf[0x10000];
unsigned char buf[1000]; send(s,testbuf,len,0);
recv(s,buf,1000,0);VC6.0下提示
error C2664: 'send' : cannot convert parameter 2 from 'unsigned char [65536]' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
error C2664: 'recv' : cannot convert parameter 2 from 'unsigned char [1000]' to 'char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
解决方案 »
- 如何自定义用户消息
- mfc中如何添加另一个视口
- 请问如何响应基于对话框应用程序的菜单项被Highlight 的消息?
- createthread的另一个小问题。
- VC中调用VB编译的动态库函数出错
- 关于键盘钩子
- 为什么我的机器一启动,各个硬盘都变成共享了,即使我去掉共享,下一次启动又恢复共享了,我该怎么办??
- 求智能指针使用思路
- 怎样知道前一个活动窗口
- MFC结合百度地图api显示路径问题
- public: __thiscall CTimeshow::CTimeshow(class CWnd *)" (??0CTimeshow@@QAE@PAVCWn
- 托盘冒泡信息显示不出来或显示在状态栏后面(VC)
send(s,(const char*)testbuf,len,0);
recv(s,(const char*)buf,1000,0);