int main()
{
fstream a("newpack",ios::out|ios::binary|ios::in);
a.write("abcdefghi",10);
char* b=NULL;
char c[20];
a.seekp(0, ios::beg);
/*a.read(b,10);*/
a.read((char*)c,10);
/*cout << b << endl;*/
cout << c << endl;
char *d=NULL;
d =(char*) "abc";
cout << d;
}
注释的两行不注释会报错