请教一个取字符串的函数?(有点难度) 如何从一个网页地址的分析出主页?比如:http://www.xxx.com/htm/dir/send.html中,如何返回其主页http://www.xxx.com/ ?请赐教,谢了. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 char szPath[] ="http://www.xxx.com/htm/dir/send.html";char* p = szPath;p = strstr(p,"//")+2;p = strstr(p,'/');*p = 0; CString Result_str;Result_str=str.Right(str.GetLength()-7);int index=Result_str.Find("/",0);Result_str=str.Left(index+8);//Result_str就是结果,str是类似 “http://www.xxx.com/htm/dir/send.html”的字符串 CSpreadSheet的BUG,求高手解答 修改resource.h之后导致原程序工具栏按钮响应出现“Debug Assertion Failed”错误 图像保存并生成图像文件 如何得知位图的大小????????? mediaplayer control全屏问题 如何在对话框中嵌入CScroolView? 找兼职! 急急急!!! 用vc一段时间了想干干活(可以免费,只要能学习),谁能提供机会. MFC Class wizard里面添加MSCOMM1 就会弹出错误 如何输出垂直文本? 问个FTP的问题.
char* p = szPath;
p = strstr(p,"//")+2;
p = strstr(p,'/');
*p = 0;
Result_str=str.Right(str.GetLength()-7);
int index=Result_str.Find("/",0);
Result_str=str.Left(index+8);//Result_str就是结果,str是类似 “http://www.xxx.com/htm/dir/send.html”的字符串