⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 55.cpp

📁 用c实现的二叉树的中序遍历的读取与存储
💻 CPP
字号:
#include<iostream.h>
#include<conio.h>
#include"bst5.h"
#include"BinNodePtr1.h"
#include"stdio.h"
int b[200];
void load()
{
  FILE *fp;
  int i;
  char outfile[10];
  cout<<"entertheinfilename:\n";
  scanf("%s",outfile);
  if((fp=fopen(outfile,"r+"))==NULL)
  {cout<<"cannot open infile\n";return;
  }
  for(int i=0;i<200;i++)
  if(fread(&b[i],4,1,fp)!=1)
  {
    if(feof(fp))return;
    cout<<"file readerror\n";
  }
}
main()
{
  //for(int i=0;i<200;i++)
  //b[i]=0;
  load();
  for(int i=0;b[i]!=0&&i<200;i++)
  {

    cout<<b[i];
  }
  getch();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -