1005. Spell It Right (20)(to_string)

来源:互联网 发布:3.3v的单片机 编辑:程序博客网 时间:2024/06/05 18:37

每每都是 int 转 string 得想半天用什么函数
好的,现在终于记下来了

#include <string>int main(){  std::string s = std::to_string(42);}

在 g++ 编译的时候可能会有 error

g++ -std=c++11 main.cpp

用这样类似的方法来编译。
好的,差不多了,题目是很简单,就不说来。

记住!

原创粉丝点击