#include <iostream> 
#include <string> 
using namespace std; 
  
void getPassword(); 
  
int main() 
{ 
  getPassword(); 
  // do stuff... 
} // main 
  
void getPassword() 
{ 
  while (true) 
  { 
    string password; 
    cout << "Enter the password: "; 
    getline(cin, password); 
  
    if (password == "12345") break; 
    cout << "INVALID. "; 
  } // while 
} // getPassword 
