C++
编程中遇到的问题和经验
Who_Am_I.
给岁月以文明,而不是给文明以岁月
展开
-
C++搭建简单的服务器
C++ Linux搭建简单服务器原创 2022-11-13 13:44:14 · 2255 阅读 · 0 评论 -
C++服务器
1111原创 2022-11-11 18:43:47 · 90 阅读 · 0 评论 -
C++服务器
C++服务器原创 2022-11-11 04:25:35 · 122 阅读 · 0 评论 -
C++实现顺序栈
#include <iostream>#include <cstdlib>using namespace std;#define MAXSIZE 50//数据类型 struct ElemType{ int n;};//栈结点结构体 typedef struct{ ElemType data[MAXSIZE]; int top;//栈顶 }SqStack;class Sq_Stack{public: //初始化 Sq_Stack(){ c原创 2021-01-22 23:14:07 · 187 阅读 · 0 评论 -
C++实现单链表
单链表的定义data 存放数据域,next为指针域带有头结点的单链表单链表的基本操作1.采用头插法建立单链表2.采用尾插法建立单链表3.插入结点操作4.删除结点操作C++代码实现#include <iostream>#include <cstdlib>using namespace std;//数据类型 typedef struct{ int x;}ElemType; //结点结构体 typedef struct LNode{ El原创 2021-01-22 11:44:37 · 136 阅读 · 0 评论 -
线性表之顺序表的实现
#include <iostream>using namespace std;// 顺序表的结构体#define MAXSIZE 50// 数据元素结构体typedef struct { int x;}ElemType; // 静态顺序表 typedef struct { ElemType data[MAXSIZE];//数据 int length;//数据大小 }SqList; class MySqList{public: MySqList(){原创 2021-01-16 14:36:12 · 114 阅读 · 0 评论 -
C++文件操作英文字母转换为大写字母
**将源文件中小写英文字母转换为大写英文字母后写到目标文件中,其他字符不变。**#include <fstream>#include <iomanip>#include <iostream>using namespace std;int main(){ char source[30],object[30]; char c; cout<<"input source file name: "; cin>>source;原创 2020-08-20 08:48:42 · 861 阅读 · 0 评论 -
C++期末考试编程题
编写程序,从键盘输入三个整数 a,b,c,将 a 的值赋给 b,b 的值赋给 c,c 的值赋给 a。输出改变后的 a,b,c 的值。(10 分)#include <iostream>using namespace std;void swap(int &a,int &b){ int t; t=a; a=b; b=t;}void swap3(int &a,int &b,int &c){ swap(a,c); swap(b,c.原创 2020-08-17 22:19:39 · 2408 阅读 · 2 评论