962148150 发表于 2018-8-27 11:27:14

代码函数名提取与shell 回顾

#include   
#include
  
int main()
  
{
  
FILE *in;
  
FILE *out;
  
char c;
  
int count=0;
  
    puts("please uesin.txt");
  
    in= fopen("in.txt", "r");
  
    out = fopen("out.txt", "w");
  
    while((c = fgetc(in)) != EOF)
  
   {
  
         if(c=='{'){count++; if(count==1)fputc(c,out); }
  
         if(c=='}') count--;
  
          if(count1)fputc(' ',out);
  
      }
  
    fclose(in);
  
    fclose(out);
  
return 0;
  
}
  
//待更多测试
  
未美观没有去空行
  
没有形成固定 的fun(){ }形式


页: [1]
查看完整版本: 代码函数名提取与shell 回顾