You should learn to use the debugger, you would have seen your mistake in the first run. Reading the documentation is also helping.
Your for loop has the problem that always the C is overwritten before written to the file.
for(i=0;i<=N;i++)
{
c.enterdata();
fout.write( (char*)&c, sizeof(c) );
}
tip: make more detailed I/O for each member in enterdata() and write the data as csv text in the file, so you can better check and reload it.