TinyXML2简介与用法用例 https://www.it610.com/article/4125766.htm
TinyXML2使用教程 https://cloud.tencent.com/developer/article/1177388
TinyXML2 入门教程 https://blog.csdn.net/K346K346/article/details/48750417
C++字符串处理函数【自写】 https://www.cnblogs.com/Stephen-Jixing/p/9866705.html
C++ int与char[]的相互转换 https://www.cnblogs.com/xiaohai123/p/13564910.html
C++ string类(C++字符串)完全攻略 (好!!!) http://c.biancheng.net/view/400.html
C++ string类insert用法总结 https://www.cnblogs.com/meihao1203/p/9670680.html
C++ int转string的多种方式 https://blog.csdn.net/xionglifei2014/article/details/85049999
1. int a = 10; char *intStr = itoa(a); string str = string(intStr); 2. int a = 10; stringstream ss; ss << a; string str = ss.str(); 3. C++11 (推荐,如果支持的话) #include <string> std::string s = std::to_string(42); 4. C++ 98即可 (不支持C++11就用这个或者2,233 ) #include <sstream> #define SSTR( x ) static_cast< std::ostringstream & >( \ ( std::ostringstream() << std::dec << x ) ).str() 5. Boost #include <boost/lexical_cast.hpp> int num = 4;
Error:‘itoa’ was not declared in this scope
有些编译器不支持itoa,因为它不是标准的。 解决方法 c++11: std::to_string sprintf stdio.h char *c = new char; sprintf(c,"%d",num); stringstream sstream.h stringstream ss; int x = 1; ss << x; string str = ss.str(); 原文链接:https://blog.csdn.net/songzige/article/details/51307167
C++ int与string的相互转换(含源码实现) https://www.cnblogs.com/smile233/p/8379802.html
C++输入输出流_输出Excel表格:https://blog.csdn.net/baidu_41793719/article/details/103846020?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0.pc_relevant_antiscanv2&spm=1001.2101.3001.4242.1&utm_relevant_index=3
#include<iostream> #include<fstream> using namespace std; int main() { ofstream outfile("data.xls"); for (int i = 0; i < 5; i++) for (int j = 0; j < 10; j++) outfile << i + j << (j < 9 ? '\t' : '\n'); outfile.close(); ifstream infile("data.xls"); int n, i = 0; while (1) { infile >> n; if (!infile) break; i++; cout << n << (i % 10 ? ' ' : '\n'); } infile.close(); return 0; }
C++ String(字符串)和 int(整数) 互转 https://www.nhooo.com/cpp/cpp-string-int-conversion.html
示例4:使用stringstream将C ++ int转换为字符串
示例
#include<iostream>
#include<string>
#include<sstream>
// 为了使用stringstream
using namespace std;
int main()
{
intnum =15;
// 创建stringstream对象ss
std::stringstream ss;
// 将num的值赋给ss
ss << num;
//用ss的值初始化字符串变量//然后使用str()函数将其转换为字符串格式
std::string str = ss.str();
std::cout<< str;
return0;
}
Ubuntu16.04配置静态ip https://www.cnblogs.com/li666/p/10578075.html