WEEK15
1.1 先設立資料夾在桌面 命名為week14-1_ fprintf
1.2 open-empty file 存檔為week14-1.cpp
1.3 程式碼
#include <stdio.h>
int main()
{///檔案指標 fout 開啟檔案(檔名 , 寫)
FILE * fout = fopen("file.txt", "w+");
printf( "Hello world\n");
fprintf(fout,"Hello World\n");
fclose(fout);///關閉檔案
}
2.1開啟 codeblocks 建立一個新檔(File > New > Empty File> : week15-1_PlaySound.cpp
2.2 上週使用 PlaySound( "檔名.wav" , NULL , SND_ASYNC); //不等待/不同步
本週使用 PlaySound( "檔名.wav" , NULL , SND_SYNC); //等待/同步
2.3要注意工作執行目錄 working_dir (in C:\....)
3.1 codeBlocks / File / Project / 檔名:week15--angles-TRT_again
ctrl c 上週程式:week14-angles-fprintf-fscanf,改善按r鍵時,動畫先拉
一下才恢復原先速度的情況
沒有留言:
張貼留言