我的C++
文章平均质量分 66
pengsimin5hao
蜕变……
展开
-
c++实现栈简单功能小程
c++实现栈简单功能小程序 #include using namespace std; class stack { private: int a[5]; //栈的大小 int n; //记录数组的下标 int t; //头指针? public: stack(); //构造函数 int push(int); //进栈 i原创 2012-12-09 20:29:25 · 393 阅读 · 0 评论 -
最长回文串
/*最长回文串*/ #include #include #include #include #define MAXN 5000+10 char buf[MAXN],s[MAXN]; int p[MAXN]; using namespace std; void huiwen() { int n,m=0,max=0,b=0,e=0; fgets(buf,size原创 2013-11-26 00:31:30 · 514 阅读 · 0 评论 -
sizeof的使用方法(转载)
SIZEOF -------------------------------------------------------------------------------------------------------- 关键字:sizeof,字节对齐,多继承,虚拟继承,成员函数指针 前向声明: sizeof,一个其貌不扬的家伙,引无数菜鸟竟折腰,小虾我当初也没少犯迷糊,转载 2013-11-26 10:58:15 · 630 阅读 · 0 评论