online-caro.cpp
/*
* Process the 'Block' state of the current account.
*/
Process the 'Block' state of the current account.
Process the ' Block ' state of the current account .
bool processBlockAccount(char* state) {
	Account* node = accountDB;
	while (node != NULL) {
		if (strcmp(node->username, state) == 0) {
			if (++node->counter == 3) {
				node->status = STATUS_BLOCKED;
				printf("[WARNING]: Account ID '%s' is blocked\n", state);
				return true;
			}
			else {
				printf("[WARNING]: Incorrect entered password counter '%d' - ID '%s'\n", node->counter, state);
				break;
			}
		}
		node = node->next;
	}
	return false;
}
bool processBlockAccount ( char * state ) { Account * node = accountDB ; while ( node != NULL ) { if ( strcmp ( node -> username , state ) == 0 ) { if ( ++ node -> counter == 3 ) { node -> status = STATUS_BLOCKED ; printf ( " \n " , state ) ; return true ; } else { printf ( " \n " , node -> counter , state ) ; break ; } } node = node -> next ; } return false ; }
Process the 'Block' state of the current account.
Process the ' Block ' state of the current account .