fileOps.cpp
/*
* function to search and display from binary file
*/
function to search and display from binary file
function to search and display from binary file
void search(int n)
{
	ifstream inFile;
	inFile.open("student.dat", ios::binary);
	Student obj;
	while (inFile.read((char*)&obj, sizeof(obj)))
	{
		if (obj.getAdmno() == n)
		{
			obj.showData();
		}
	}
	inFile.close();
}
void search ( int n ) { ifstream inFile ; inFile . open ( " " , ios :: binary ) ; Student obj ; while ( inFile . read ( ( char * ) & obj , sizeof ( obj ) ) ) { if ( obj . getAdmno ( ) == n ) { obj . showData ( ) ; } } inFile . close ( ) ; }
function to search and display from binary file
function to search and display from binary file