Ai
1 Star 1 Fork 1

无线电/3_c++练习

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
5_int_float转string.cc 333 Bytes
一键复制 编辑 原始数据 按行查看 历史
无线电 提交于 2023-12-30 15:57 +08:00 . string 测试
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
int a = 22;
string str = "int a=" + to_string(a);
cout << str << endl;
double b = 3.1415;
string str_double = "double b=" + to_string(b);
cout << str_double << endl;
return 0;
}
/* 运行结果
int a=22
double b=3.141500
*/
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/zero2200/3_cpp-practice.git
git@gitee.com:zero2200/3_cpp-practice.git
zero2200
3_cpp-practice
3_c++练习
master

搜索帮助