?????????????

?????????????????棬?????????????????????????????????????????洢?????Щ?洢??????????????????????????????????????????????????????????????????????豸????????豸??????????????????????????

????????????????

???????????????????????

???????????????????????????????????????????????????????????????????????????????????????????????????ж????????????????????д??????????????????????????????????????????????????????????????????????????

????????磬????????????????????????????????????????????????????????????????????????????????????????????????????CPU????????????顣??????????????????????????????????????????????????豸??CPU?????????????????????????????????豸??????CPU???Э????????????????????????豸???CPU??????CPU??????????Ч???????

????????????????

?????????? ????????????????塢?л??????????塣

????1???????

??????????????£??????????I/O????????????I/O??????????????????????????????д??

????2???л???

??????????????£??????????????????????з?????????????I/O???????????????????????????????????????????????????????????I/O???????????????????????????

????3??????????

???????????л??壬??????????stderr?????????????ó??????????????????????????

???????????????

????????????????????????????:

????1?????????????

????2?????flush???

????3?????endl???

????4??????????

?????????????????????????????????????????????????I/O????????????C++?У???????????flush???????????????????I/O???????????????????磺cout << flush; //????????????????????????????????

????endl??????????????????????????豸??????п????????????????????

????cout < < endl;

????????

????cout < < ” ”< < flush;

????????????????

????1?????????????????

????????????????????????????′???

#include< fstream >
using namespace std;

int main()
{
    //???????test.txt????
 ofstream outfile("test.txt");

    //??test.txt?????д??4096?????’a’
 for(int n=0;n< 4096;n++)
 {
  outfile <<  'a';
 }
    //????????????????
 system("PAUSE");
  
    //??????test.txt?????д?????’b’??????????4097???????’b’
 outfile < <  'b';

    //????????????????
 system("PAUSE");

 return 0;
}