首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >C++ const::string赋值

C++ const::string赋值
EN

Stack Overflow用户
提问于 2014-10-17 02:18:43
回答 3查看 2.2K关注 0票数 2

在const::string赋值/声明中,什么是最合适的?使用构造函数(例如,const std::string WORD("hello");)还是使用相等的运算符(例如,const std::string WORD= "hello";)?这些东西在内存使用或时间处理上有差异吗?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26416898

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档