当前位置: 首页 > news >正文

台州建站服务哪里做外贸网站

台州建站服务,哪里做外贸网站,个人网站管理系统,wordpress 图片 并排由于本人要接手一项C方面 的工作。由于不会C,不过做过JAVA 以及一些web方面的开发#xff0c;加之时间比较短。所以需要速成#xff0c;于是学习笔记也基本都是用代码代替。 //范例资源文件 /****************************************************************************…由于本人要接手一项C方面 的工作。由于不会C,不过做过JAVA 以及一些web方面的开发加之时间比较短。所以需要速成于是学习笔记也基本都是用代码代替。 //范例资源文件 /***************************************************************************************** Test.txt : tom 123456789 lilei 234567891 zhangsan 345678912 tom 456789123 xiaohe 567891234                                                                     ******************************************************************************************/ //未用名字空间使用vector 进行遍历 /****************************************************************************************** #include stdafx.h #include iostream #include string #include vector #include fstream int _tmain(int argc,_TCHAR* argv[]) { std::string strtmp; std::ifstream fs(Test.txt); std::vectorstd::string vect; while(getline(fs,strtmp,\n)) { vect.push_back(strtmp.substr(0,strtmp.find( ))); } for(std::vectorstd::string::size_type index 0; index vect.size();index) { std::cout vect[index]   std::endl; } return 0; } ******************************************************************************************/ //使用名字空间,使用vector进行遍历 /****************************************************************************************** #include stdafx.h #include iostream #include string #include vector #include fstream using namespace std; int _tmain(int argc,_TCHAR* argv[]) { string strtmp; ifstream fs(Test.txt); vectorstring vect; while(getline(fs,strtmp,\n)) { vect.push_back(strtmp.substr(0,strtmp.find( ))); } for(int index 0; index vect.size();index) { cout vect[index]   endl; } return 0; } ******************************************************************************************/ //利用迭代器对vector进行遍历 /****************************************************************************************** #include stdafx.h #include iostream #include string #include vector #include fstream using namespace std; int _tmain(int argc,_TCHAR* argv[]) {  string strtmp;  ifstream fs(Test.txt);  vectorstring vect;  while(getline(fs,strtmp,\n))  {   vect.push_back(strtmp.substr(0,strtmp.find( )));  }  vectorstring::iterator it vect.begin(); for(;it ! vect.end();it)  {   cout *it  endl;  }  return 0; } ******************************************************************************************/ //使用map 进行遍历 /****************************************************************************************** #include stdafx.h #include iostream #include string #include vector #include fstream #include map using namespace std; int _tmain(int argc,_TCHAR* argv[]) {  string strtmp;  ifstream fs(Test.txt);  mapstring,string  map_temp;  string::size_type index string::npos; while(getline(fs,strtmp,\n))  {  index strtmp.find();  map_temp[strtmp.substr(0,index)] (strtmp.substr(index));  }  mapstring,string ::iterator it map_temp.begin(); for(; it ! map_temp.end(); it)  {   cout it-first it-second endl;  }  return 0; } ******************************************************************************************/ //使用for_each 利用重载操作符 进行map遍历 /****************************************************************************************** #include stdafx.h #include iostream #include string #include vector #include fstream #include map #include iterator #include algorithm using namespace std; class showIiem { public: void operator()(const mapstring,string::value_type value) { cout value.first value.second \n; }; }; int _tmain(int argc,_TCHAR* argv[]) {  string strtmp;  ifstream fs(Test.txt);  mapstring,string  map_temp;  string::size_type index string::npos; while(getline(fs,strtmp,\n))  {   index strtmp.find();   map_temp[strtmp.substr(0,index)] (strtmp.substr(index));  }  showIiem show;  for_each(map_temp.begin(),map_temp.end(),show);  return 0; } ******************************************************************************************/ // 利用copy使用重载操作符 进行map遍历 /****************************************************************************************** #include stdafx.h #include string #include fstream #include iostream #include algorithm #include map #include vector using namespace std; namespace std {  std::ostream operator(std::ostream os, const std::mapstd::string,std::string::value_type value)  {   os value.first value.second;   return os;  } } class ShowValue { public:  ShowValue(std::ostream os):m_os(os)  {  } void operator()(const std::mapstd::string,std::string::value_type value)  {   m_os value.first value.second \n;  }  std::ostream m_os; }; typedef std::ostream_iteratorstd::mapstd::string,std::string::value_type ositertype; std::ostream operator(std::ostream os, const std::mapstd::string,std::string value) {  std::for_each(value.begin(), value.end(), ShowValue(os));  return os; } int _tmain(int argc,_TCHAR* argv[]) {  std::string strtmp;  std::fstream in(Test.txt);  std::mapstd::string,std::string  map_1;  std::string::size_type idx std::string::npos;  while(std::getline(in, strtmp, \n))  {   idx strtmp.find( );   map_1[strtmp.substr(0, idx)] strtmp.substr(idx);  }  ositertype os_iter(std::cout, \n);  std::copy(map_1.begin(), map_1.end(), os_iter);  return 0; }
http://www.zqtcl.cn/news/718840/

相关文章:

  • 建设国际互联网网站完整网站开发教程
  • 一个购物交易网站怎么做网站管理功能图
  • 做有后台的网站如何提交网站地图
  • 网站建设税率多少潍坊市住房和城乡建设局网站
  • 网站图片怎么做白色背景青岛公司做网站的价格
  • 网站seo工具wordpress放视频没画面
  • 自己做个网站要多少钱o2o商城网站系统开发
  • 百度网站优化哪家好长沙抖音推广代运营公司
  • 做网站的软件worddede 后门暴网站
  • 极简风格 网站上市公司seo是什么意思
  • 商城手机网站设计网架公司十大排名
  • 在建设主题网站时邯郸房产信息网恋家网
  • 保山做网站建设做网站zwnet
  • 南阳做网站推广自助个人免费网站
  • 企业做网站怎么做高校档案室网站建设
  • 辽宁省建设厅网站升级期货交易软件定制开发
  • 网站建设公司工资设置mufen wordpress
  • 资阳网站网站建设月夜直播免费完整版
  • 自己的网站打不开了网站建设维护成本
  • 最便宜做网站c2c网站建站的标准
  • 家里电脑做网站服务器下载中国移动商旅100最新版本
  • 深圳建站公司开发费用做网站网页的工作怎么样
  • 网站工程师平均工资网站开发合同里的坑
  • 南通公司建站模板品牌网站建设小蝌蚪
  • 网站备案号 有效期微信小程序开发视频完整教程
  • 给公司做网站需要什么信息html制作百度登录页面
  • 济南市建设执业资格注册中心网站小程序源码模板下载
  • 免费做网站怎么做网站网页生成app制作
  • 网站建设中的财务预算广州网站制作
  • 经营范围网站建设wordpress主题去除友情链接