?? produce.cpp
字號:
const int MAXNUM =100000;
void produce(char *FileName)
{
int i;
ofstream outFile;
outFile.open(FileName);
if(!outFile)
{
cout<<FileName<<" can't open."<<endl;
abort();
}
srand((int)time(0));
for(i=0;i<NUM;i++)
{
outFile<<(long)(rand()/32767.0*MAXNUM)<<" ";
}
outFile.close();
return ;
}//產生數組數據,并且放在文件中
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -