会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Maxproto
博客园
首页
新随笔
联系
订阅
管理
2020年9月19日
c++ 区分字符串指针和数组指针
摘要: #include <iostream> int main() { //创建指向字符串的指针 using namespace std; char str[999]; cin >> str; char *pn = str; //字符串名被解释为其第一个元素的地址(cout对象认为char的地址是字符串的
阅读全文
posted @ 2020-09-19 00:45 Maxproto
阅读(153)
评论(0)
推荐(0)
2020年9月18日
递归算法:汉诺塔问题
摘要: #include <iostream> #define _CRT_SECURE_NO_WARNINGS using namespace std; //初始化全局变量s记录步数 int s; //移动盘子的函数,即打印出移动的过程,参数为函数的编号,盘子的起始位,盘子的终止位 void move(in
阅读全文
posted @ 2020-09-18 17:17 Maxproto
阅读(146)
评论(0)
推荐(0)
2020年9月2日
检测输入值是否为整型
摘要: 1 #include <iostream> 2 #include <climits> 3 #include <string> 4 #include <math.h> 5 #define _CRT_SECURE_NO_WARNINGS 6 7 bool is_num(char*); //Check w
阅读全文
posted @ 2020-09-02 00:25 Maxproto
阅读(167)
评论(0)
推荐(0)
公告