Return true if the pin code matched the ReGex
if ( regex_match ( pinCode , pattern ) ) { return true ; } else { return false ; } } void print ( bool n ) { if ( n == 0 ) { cout << " False " << endl ; } else { cout << " True " << endl ; } }