ITPub博客

首页 > 应用开发 > > c++分主题

c++分主题

作者:deepocean601 时间:2019-09-04 15:17:15 0 删除 编辑

ifstream、ofstream、fstream文件操作

const string& path;

ifstream infile(path.c_str());

if (!infile)

{

LOG(ERROR) << "Open blackurl dict failed.";

return false;

}

字符串和数字之间转换:

#include

#include  

signed char c = boost::numeric_cast(97);

int ii = boost::lexical_cast("127");后者int ii = aoi(data_count.c_str())先转换为char*然后atoi

std::string s = boost::lexical_cast(97);

stringstream类

explicit构造函数

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2557/viewspace-3131262/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-08-16

  • 博文量
    102
  • 访问量
    475