コード例 #1
0
ファイル: office.c プロジェクト: camilohel777/ansiCprojects
int main(int argc, char **argv)
{
	checkArgc(argc);

	studentsWaiting = inputValidation(argv[1]);
	officeLimit = inputValidation(argv[2]);

	pthread_mutex_init(&office_mutex, NULL);
	pthread_mutex_init(&student_mutex, NULL);
	pthread_mutex_init(&professor_mutex, NULL);
	pthread_mutex_init(&student_question_mutex, NULL);

	pthread_cond_init(&professor_complete_cv, NULL);
	pthread_cond_init(&student_question_cv, NULL);
	pthread_cond_init(&office_capacity_cv, NULL);

	executeThread(studentsWaiting);

	return 0;
}
コード例 #2
0
ファイル: login.cpp プロジェクト: tdonaldson/AccountAccess
// Creates the menu.
void LogIn::mainMenu()
{
	cout << "-------------\n";
	cout << "--MAIN MENU--\n";
	cout << "-------------\n";
	cout << "1. New\n";
	cout << "2. Existing\n";
	cout << "3. Delete\n";
	cout << "4. Display\n";
	cout << "9. Quit\n";
	choice = inputValidation("Choice", 1, 4);
	cin.get();
	menuChoices();
}