Error

C++博客 首页 新随笔 联系 聚合 管理
  217 Posts :: 61 Stories :: 32 Comments :: 0 Trackbacks
string传值方式效率肯定是有问题的,如果使用引用方式,则必须提供原生指针接口,否则会有异常

void Test(const std::string& strParam)
{
strParam.c_str();
}
void Test(const char* szParam)
{
}
void Test()
{
Test(nullptr);
int i = 0;
i++;
std::string strA = "---";
}
posted on 2014-11-07 14:47 Enic 阅读(1256) 评论(0)  编辑 收藏 引用 所属分类: C/C++技巧

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理