回覆列表
  • 1 # 使用者834195712159

    static void UpdateHistoryFile(void)

    {

    FILE *fin,*fout;

    int counter = 1;

    STest test;

    do

    {

    fin=fopen("test.txt","r");

    fout=fopen("t.tmp","w");

    while(readHistoryFile(fin, &test) != EOF)

    {

    if (test.b == 20160516) // to add the judgement case.

    {

    printf("test.b < 20160516\n");

    }

    else

    {

    test.a = counter;

    writeHistoryFile(fout, test);

    counter++;

    }

    }

    fclose(fin);

    fclose(fout);

    remove("test.txt");

    rename("t.tmp","test.txt");

    }while(0);

    return;

    }

  • 中秋節和大豐收的關聯?
  • 新奇駿才開300公里就上高速,要跑一千多公里,以後對發動機和變速箱會不會不好?