Home
Sign Up
Sign In
ruoshan's recent timeline updates
ruoshan
V2EX member #45954, joined on 2013-09-25 17:06:11 +08:00
ruoshan
提问
技术话题
好玩
工作信息
交易信息
城市相关
ruoshan's recent replies
Jul 4, 2019
Replied to a topic by
fetich
›
C++
›
请教《C++ Primer》一书中有关显式类型转换的问题
string 的构造函数有一个是这个:
`basic_string( const CharT* s, const Allocator& alloc = Allocator() );`
static_cast<std::string>(cp) 和 std::string(cp) 是一样的效果.
你可以编译一下 `g++ -std=c++11 -g -S
x.cc
` 看一下 `x.s`. 他们两个编译出来的代码是一样的.
»
More replies by ruoshan
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
3281 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 184ms ·
UTC 12:48
·
PVG 20:48
·
LAX 05:48
·
JFK 08:48
♥ Do have faith in what you're doing.
❯