摘要: 头文件#include<string>不能写成#include<string.h> 阅读全文
posted @ 2020-03-20 16:32 ShineLe 阅读(596) 评论(0) 推荐(0)
摘要: string库 1、size()与length() 字符串长,结果相同 string s; s.length(); //s.length()-1是最后一个字符的下标,而不是'\0' for(i=0;i<s.length()-1;i++) cout<<s[i]<<endl; //可以输出每个字符 s. 阅读全文
posted @ 2020-03-16 23:41 ShineLe 阅读(531) 评论(0) 推荐(0)
摘要: https://jingyan.baidu.com/article/49711c616b8a1ffa441b7cdc.html 阅读全文
posted @ 2020-01-07 21:04 ShineLe 阅读(378) 评论(0) 推荐(0)
摘要: 程序末尾添加 system("pause"); 阅读全文
posted @ 2020-01-07 15:33 ShineLe 阅读(249) 评论(0) 推荐(0)
摘要: 按 “F5”(开始调试的快捷键)运行到下个断点处。 阅读全文
posted @ 2020-01-07 15:22 ShineLe 阅读(305) 评论(0) 推荐(0)
摘要: 1、使用前应先包含头文件string.h,有的是cstring #include<string> 这样才能正确的cin和cout字符串。 cin时,是按照空格、TAB和换行进行分割的 例如,输入Hello World 使用cin输入,监视输入的对象,可以看到,是分Hello 和World两次cin的 阅读全文
posted @ 2020-01-07 15:18 ShineLe 阅读(421) 评论(0) 推荐(0)
摘要: 菜单栏 “工具”->选项->环境->常规 阅读全文
posted @ 2020-01-05 21:44 ShineLe 阅读(373) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/glw0223/article/details/93195009 阅读全文
posted @ 2020-01-05 21:38 ShineLe 阅读(1138) 评论(0) 推荐(0)
摘要: //创建 int **a=new int *[n]; for(i=0;i<n;i++) a[i]=new int[n]; // …… // 删除 for(i=0;i<n;i++) delete [] a[i]; delete [] a; 阅读全文
posted @ 2020-01-05 20:52 ShineLe 阅读(487) 评论(0) 推荐(0)
摘要: 在第一行#include<iostream>下边一行加上一句 using namespace std; 阅读全文
posted @ 2020-01-04 13:59 ShineLe 阅读(855) 评论(0) 推荐(0)