写于20160504 c++切割那个文件的代码
</pre><pre name="code" class="cpp">#include<iostream>
#include<fstream>
#include<string>
using namespace std;
int main()
{
ofstream out("54321.txt",ios::out);
int a[20];
int i;
/*for(i=0;i<=10;i++)
{
cin>>a[i];
outfile<<a[i]<<"\n";
}
*/
//outfile.close();
ifstream in("12345.txt", ios::in);
string str1;
int count=1;
string str;
for(i=0;i<100;i++)
{
out<<"asdfghjkl"<<","<<"23421"<<","<<"liangjingru"<<","<<"fdkghsdfkghsdfjk"<<"\n";
}
/* while(getline(in, str1))
{
cout << str1 << endl;
if(str1.length()>11)
str = str1.substr(0,10);
else
str=str1;
if(count%4!=0)
out<<str<<",";
if(count%4==0)
{
out<<str<<"\n";
}
count++;
}*/
}