首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

关于C++中的send函数有关问题

2012-09-16 
求助关于C++中的send函数问题string sendshellosend(sockconect,(char*)&sends,strlen(sends)+1,0)提

求助关于C++中的send函数问题
string sends="hello";
  send(sockconect,(char*)&sends,strlen(sends)+1,0);
  提示rror C2664: 'strlen' : cannot convert parameter 1 from 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >' to 'const char *'
我该怎么改啊,求大神指教啊

[解决办法]
send(sockconect,sends.c_str(),strlen(sends.c_str())+1,0);

热点排行