AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
[TOC] ## 数组 ``` double balance[] = {1000.0, 2.0, 3.4, 7.0, 50.0}; balance[5]=12; std::cout << balance[5] << std::endl; //12 ``` ### 多维数组 ``` int a[2][3] = {{1, 2, 3,}, {3, 4, 5}}; ``` ## 字符串 ### char 初始化 ``` char asd[] ="hello"; ``` ### 使用 string ``` #include <string> string demo = "hello word"; cout << demo << endl; ``` 常用函数 ``` s.empty() //空 返回 true s.size() //返回字符串个数 s[n] //返回第几个字符,从 0 开始 s1+s2 //字符串拼接 ```