assgn9/StudentDB.cpp
Student_list_pointer StudentDB::find_student(string ssn) {
	if(!check_socialsecuritynumber(ssn)) {
		cout << "Social security number entered is invalid" << endl;
		return database.end();
	}else{
		Student_list_pointer p = database.begin();
int j=0;
		while(p != database.end()) {
			if(((*p)->get_ssn()) == ssn) {
cout<<"p is: "<<j<<endl;
				return p;
			}else{
int j=0;
				p++;
			}
		}
		return database.end();
	}
}
/**
 * Function to find the pointer to a student with the social security
 * number of ssn
 * @param ssn is the social security number of the student you want to
 *	search for.
 * @return the pointer to the student, if that student is found.
 *	Else, return a pointer pointing to the end of the list
 */
Function to find the pointer to a student with the social security
number of ssn
@param ssn is the social security number of the student you want to
search for.
@return the pointer to the student, if that student is found.
Else, return a pointer pointing to the end of the list
Function to find the pointer to a student with the social security number of ssn @param ssn is the social security number of the student you want to search for . @return the pointer to the student if that student is found . Else return a pointer pointing to the end of the list
Student_list_pointer StudentDB::find_student(string ssn) {
	if(!check_socialsecuritynumber(ssn)) {
		cout << "Social security number entered is invalid" << endl;
		return database.end();
	}else{
		Student_list_pointer p = database.begin();
int j=0;
		while(p != database.end()) {
			if(((*p)->get_ssn()) == ssn) {
cout<<"p is: "<<j<<endl;
				return p;
			}else{
int j=0;
				p++;
			}
		}
		return database.end();
	}
}
Student_list_pointer StudentDB :: find_student ( string ssn ) { if ( ! check_socialsecuritynumber ( ssn ) ) { cout << " " << endl ; return database . end ( ) ; } else { Student_list_pointer p = database . begin ( ) ; int j = 0 ; while ( p != database . end ( ) ) { if ( ( ( * p ) -> get_ssn ( ) ) == ssn ) { cout << " " << j << endl ; return p ; } else { int j = 0 ; p ++ ; } } return database . end ( ) ; } }
Function to find the pointer to a student with the social security
 number of ssn
 @param ssn is the social security number of the student you want to
      search for.
Function to find the pointer to a student with the social security number of ssn @param ssn is the social security number of the student you want to search for .