Ejemplo n.º 1
0
List values(const List& L) {
	List l;
	for (int i=0; i<L.size(); i++) {
		int n = L[i];
		if (!isfound(n,l)) l.push_back(n);
	}
	return l;
}
Ejemplo n.º 2
0
/*
The member function of set_customer accepts the customer ID#,
and stores the customer information into the member variables.
*/
bool customers::set_customer(string &input_id) {
	bool isok = false;
	customer_info *found_customer = nullptr;
	found_customer = new customer_info;

	if (id_check(input_id) && isfound(input_id, found_customer) && check_stay(found_customer)) {

		c_id = found_customer->cid;
		c_name = found_customer->cname;
		chin_date = found_customer->in_date;
		chin_time = found_customer->in_time;
		chout_date = found_customer->out_date;
		chout_time = found_customer->out_time;

		isok = true;
	}

	delete found_customer;
	found_customer = nullptr;

	return isok;
}