- 博客(5)
- 资源 (4)
- 收藏
- 关注
原创 创建及删除二叉树
#include using namespace std; class BiNode{ private: BiNode *LChild, *RChild; int Data; public: BiNode(): LChild(NULL),RChild(NULL),Data(-1){} BiNode(BiNode* l,BiNode* r,int d): LChild(l),
2012-02-05 20:12:05
268
原创 字符串训练--把句子的单词顺序倒置
#include #include #include using namespace std; int main() { int i, j; string str = "", v_str; cout while(cin >> v_str) { str += v_str; str +=" "; } vector vec; char *p = &str[0]; if(
2012-02-03 21:54:02
358
原创 求字符串里出现最多的子串及次数
练手的小程序,不写注释了 #include #include #include #include #include using namespace std; void main() { bool equal = false; unsigned long int i,j,max = 0; string str = "abcdcbababccabccddemmmmmcdfab
2012-02-02 20:23:25
343
原创 八皇后问题
<br />直接上代码<br /><br />#include<iostream><br />#include<memory.h><br />#define N 8<br />using namespace std;<br /> <br />int t = 0; //全局变量,用来统计结果个数<br /> <br />void PrintResult(bool *p)<br />{<br />int i,j;<br />for(i = 0;i < N;i++)<br />{ cout << "/t"
2011-02-07 21:15:00
199
原创 《C++ Primer》心得(一)
学习型博客与其说是给别人看,不如说是给自己一个机会把知识梳理清楚---- 优快云 C++博客 刘未鹏 以前听人说:C++只是C语言加上类而已。深入学习后才发现其实不然,对于现代C++而言,已经不能这么描述了,也逐渐明白了为什么C++之父一直在呼吁 要把C++当做一种全新的语言来学习。从上个学期末开始看《C++ Primer》到现在已经近一百天了,书也看了超过400页,现在正在进行第十三章《复制控制》,趁机把一些心得记录一下。 1 面向对象思想:毫无疑问这个是C++的精
2010-10-17 00:10:00
312
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人