当前位置: 首页 > news >正文

东营做网站公司wordpress目录排序

东营做网站公司,wordpress目录排序,上海做网站设计公司,旅游业网站开发建设day3_C 思维导图用C的类完成数据结构 栈的相关操作用C的类完成数据结构 循环队列的相关操作 思维导图 用C的类完成数据结构 栈的相关操作 stack.h #ifndef STACK_H #define STACK_H#include iostream #include cstringusing namespace std;typedef int datat… day3_C 思维导图用C的类完成数据结构 栈的相关操作用C的类完成数据结构 循环队列的相关操作 思维导图 用C的类完成数据结构 栈的相关操作 stack.h #ifndef STACK_H #define STACK_H#include iostream #include cstringusing namespace std;typedef int datatype;#define MAX 5class Stack { public:/*构造函数*/Stack();/*拷贝构造函数*/Stack(const Stack others);/*析构函数*/~Stack();/*判满 true 满 */bool is_full();/*判满 true 空*/bool is_empty();/*入栈*/void in_stack(datatype e);/*出栈*/datatype out_stack();/*清空栈*/void clear_stack();/*求栈顶元素*/datatype get_stackTop_E();/*求栈的大小*/void get_stackSize();private:int top;datatype *data; };#endif // STACK_Hstack.cpp #include stack.hStack::Stack():data(new int[MAX]),top(-1) {memset(this-data,0,MAX);//在堆区申请max个int大小的空间cout栈容器初始化成功endl; }Stack::Stack(const Stack others):data(new int[MAX]),top(others.top) {//深拷贝将堆区内容也拷贝进来for(int i 0;iMAX-1;i){this-data[i] others.data[i];}cout拷贝完成endl; }Stack::~Stack() {//释放堆区数据delete []data;cout析构完成endl; }bool Stack::is_full() {if(this-top MAX-1)return true;elsereturn false; }bool Stack::is_empty() {if(this-top -1)return true;elsereturn false; }void Stack::in_stack(datatype e) {if(this-is_full()false){this-top;this-data[this-top] e;cout入栈成功endl;}else{cout入栈失败栈满endl;} }datatype Stack::out_stack() {if(this-is_empty()false){datatype temp this-data[this-top];this-top--;return temp;}else{cout出栈失败栈空endl;return NULL;} }void Stack::clear_stack() {if(this-is_empty()false){this-top-1;cout清空成功endl;}else{cout栈空无需清理endl;} }datatype Stack::get_stackTop_E() {if(this-is_empty()true)return NULL;return this-data[this-top]; }void Stack::get_stackSize(){cout栈中有元素 this-top1个endl; }用C的类完成数据结构 循环队列的相关操作 queue.h #ifndef QUEUE_H #define QUEUE_H #include iostream #include cstringusing namespace std;typedef int datatype; #define MAX 5class Queue {public:/*构造函数*/Queue();/*拷贝构造函数*/Queue(const Queue others);/*析构函数*/~Queue();/*判满 true 满 */bool is_full();/*判满 true 空*/bool is_empty();/*入队*/void in_queue(datatype e);/*出队*/datatype out_queue();/*清空队*/void clear_queue();/*求队的大小*/void get_queueSize();private:datatype *data;int font;int tail; };#endif // QUEUE_Hqueue.cpp #include queue.hQueue::Queue():data(new int [MAX]),tail(0),font(0) {memset(this-data,0,MAX);cout循环队列初始化成功endl; }Queue::Queue(const Queue others):data(new int[MAX]),font(others.font),tail(others.tail) {//深拷贝int f this-font;int t this-tail;while ((fMAX)%MAXt) {this-data[f] others.data[f];f;}cout拷贝完成endl; }bool Queue::is_full() {if((this-tail1)%MAX this-font){return true;}return false; }bool Queue::is_empty() {if(this-font this-tail){return true;}return false; }Queue::~Queue() {//释放堆区数据delete []data;cout析构完成endl; }void Queue::in_queue(datatype e) {if(this-is_full() true){cout队列满了endl;return ;}this-data[this-tail] e;this-tail (this-tail1)%MAX;cout入队成功endl; } /*出队*/ datatype Queue::out_queue() {if(this-is_empty() true){cout队列空无元素endl;return NULL;}int temp this-data[this-font];this-font (this-font1)%MAX;return temp; }void Queue::clear_queue() {if(this-is_empty() true){cout队列空无元素endl;return;}this-font 0;this-tail 0; }void Queue::get_queueSize() {cout队列的大小是 (this-tail-this-fontMAX)%MAXendl; }
http://www.hkea.cn/news/14326206/

相关文章:

  • 网站社区怎么创建gstatic wordpress
  • 有哪些好的做网站公司北京网站提升排名
  • wordpress签到积分主题无锡网站建设方案优化
  • 徐州做网站多少钱安全优化大师下载
  • 昆山便宜做网站flash可以做网站吗
  • 相城高端网站建设html5网站制作软件
  • 企业品牌网站制作做网站湘潭
  • 白山市建设局网站网络工程师证书难考吗
  • 网站开发与设计入门WordPress和帝国安全
  • 阳泉住房建设局网站网站后台界面设计
  • 海南网站建设fwlit网站旁边的小图标怎么做的
  • 烟台开发区建设业联合会网站网站下载不了怎么解决
  • 如何将网站添加到信任站点wordpress支持的语言
  • 门户网站平台建设方案百度上能收到的企业名称网站怎么做
  • golang 网站开发天津网站制作哪家好薇
  • 修机械师怎么做我小样网站角仰望网站建设怎么设计更加吸引人
  • 网站忧化技巧环球旅行社网站建设规划书
  • 网站开发的目标怎么搭建小程序平台
  • 网站开发 旅游外贸商城网站系统
  • 做直播的在相亲网站交友wordpress 首页循环
  • 中英语双语网站咋做宣传类的网站
  • 盐城市城乡建设局网站马鞍山网站制作
  • 基于淘宝的网站开发分析浙江省建设厅门户网站
  • 上海平台网站建设比百度好用的搜索软件手机版
  • 咕果网给企业做网站的取消网站备案流程
  • 如何做织梦手机网站番禺做网站费用
  • 网站开发人员资质网站设计 线框图 怎么画
  • discuz网站编码架设网站是自己架设服务器还是租服务器
  • 门户网站 建设方案wordpress门户主题
  • wordpress 半天打不开吉林seo刷关键词排名优化