- 博客(4)
- 收藏
- 关注
原创 用C/C++创建二叉树并进行中序遍历
代码如下:#include<iostream>#include<stdlib.h>#include<conio.h>#include<windows.h>using namespace std;typedef struct binary_Tree//定义树的数据域{ int num; struct binary_Tree *left; struct binary_Tree *right;}Node;typedef s...
2021-11-10 21:04:22 998
原创 用C/C++实现单链表存入数据并展示数据的操作
具体代码如下:#include<iostream>#include<windows.h>#include<stdlib.h>using namespace std;typedef struct node{ int num; struct node *next;}nodee,*nodeptr;nodeptr numlist;void initlist()//初始化单链表{ numlist=(nodeptr)malloc(size...
2021-11-10 20:35:29 2140
原创 用C/C++编写一个可以获取时间的代码
主要通过调用time.h头文件来实现具体代码如下:#include<iostream>#include<time.h>using namespace std;int main(){ time_t p; struct tm *t; time(&p); t=gmtime(&p); cout<<"输出你的电脑现在的时间:"<<endl; cout<<t->tm_yea...
2021-11-10 20:20:47 1802
原创 用C/C++编写密码输入
//主要通过getch()来实现代码如下:#include<iostream>#include<conio.h>using namespace std;int main(){ int k=0; char c; char str[200]; while((c=getch())!='\r') { if(c=='\b') { if(k>0) {...
2021-11-10 20:00:50 2153
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人