I have typed in a function,but it shows declaration error.
here is the function:
void writeinto()
{
club c;
int N,i;
{
ofstream fout("project.d at",ios::binary );
{
if(!fout)
{
cout<<"Error";
exit(0);
}
while(!fout.eof ())
{
cout<<"Enter the number of records to be entered";
cin>>N;
{for(i=0;i<N;i+ +)
c.enterdata();
fout.write((cha r*)&c,sizeof(c) );
}
fout.close();
}}}
here is the function:
void writeinto()
{
club c;
int N,i;
{
ofstream fout("project.d at",ios::binary );
{
if(!fout)
{
cout<<"Error";
exit(0);
}
while(!fout.eof ())
{
cout<<"Enter the number of records to be entered";
cin>>N;
{for(i=0;i<N;i+ +)
c.enterdata();
fout.write((cha r*)&c,sizeof(c) );
}
fout.close();
}}}
Comment