std::string str = "hello world" + 'b';

这是个很无聊的题目,"hello world"是一个char*,‘b’被提升为一个int,因此这是一个合法的表达式。

相关文章:

  • 2021-12-07
  • 2021-09-22
  • 2021-12-26
  • 2021-10-08
  • 2021-10-25
  • 2021-08-28
  • 2021-04-04
猜你喜欢
  • 2021-08-24
  • 2021-05-08
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2021-04-18
  • 2022-12-23
相关资源
相似解决方案