获取当前网页的所有连接

2014-11-24 11:34:47 · 作者: · 浏览: 0
// getURLS.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include 
  
   
#include 
   
     #include 
     #include 
     
       using namespace std; int _tmain(int argc, _TCHAR* argv[]) { const char* filepath=".\\test.htm"; //网页文件路径 map
      
        mapLink; //容器用于存放抽取出来的链接和计数 string line; //一行数据 string 
       htmlcontent; //html文件内的所有内容 ifstream readfile(filepath); if(!readfile) //打开文件失败 { cout<<"打开文件失败!"<
       
::iterator it=mapLink.begin();it!=mapLink.end();it++) { cout< first<<"---计数:"< second<