
C++笔记
Debug@Wang
我是DebugWang,一个正在学习AI\摄影,正在寻找生活的乐趣,尝试享受生活的90后coder。
展开
-
C++大学教程第七版8.16走迷宫问题
题目如上图所示,我的代码如下: ```cpp /* 走迷宫: #表示墙,.代表路 思路:右手始终个跟着墙的方向 */ #include <iostream> using namespace std; //迷宫 //#: 代表墙 .: 代表路径 X: 代表小老鼠 char ch[12][13]= { {'#','#','#','#','#','#',...原创 2020-04-01 22:43:35 · 393 阅读 · 0 评论 -
c++析构函数delete位置访问冲突问题
我的测试代码如下 #include <iostream> #include <cstring> #include <string> using namespace std; class A{ char* ch; public: A(char * str){ int len =strlen(str); ch = new char[len...原创 2020-03-19 00:22:36 · 2170 阅读 · 0 评论