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

📄 crtstatm.c

📁 unix下进行电报传输的源码。采用信号灯技术避免文件冲突等等
💻 C
字号:
#include <stdio.h>
#include "nfcnet.h"
void main(void)
{ int i,j;
  FILE *fp;
  char c_key[10];
  c_key[0]=0;
  printf("\n\nBe carefull to run this program, because it\n");
  printf("destroy the data in file stat_obj.txt .\n\n");
  while(strlen(c_key)==0||
          c_key[0]!='Y'&&
          c_key[0]!='y'&&
          c_key[0]!='N'&&
          c_key[0]!='n')
  { printf("Are you sure to run this program(Y/N) [s] ");
    gets(c_key); }
  if(c_key[0]=='N'||c_key[0]=='n')exit(0);
  if((fp=fopen("stat_obj.txt","w+"))==NULL)
  { printf("The stat_obj.txt is not opened !\n");
    exit(1);}
  for(i=0;i<P_STTNUMB;i++)
  { fprintf(fp,"00000");
    for(j=0;j<P_SENDOBJ;j++)fprintf(fp,"N");
    fprintf(fp,"\n");
  }
  fclose(fp);
  printf("The stat_obj.txt is created !\n");
}

⌨️ 快捷键说明

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