void display_info(Course courses[], Student students[],
  int courses_actual, int students_actual)
{
  int choice;

  do
  {
    choice = get_choice();
    switch (choice)
    {
      case 0: break;
      case 1:
        find_CRN(courses, students, courses_actual, students_actual);
        break;
      case 2: find_subject(courses, courses_actual); break;
      case 3:
        add_course(courses, students, courses_actual, students_actual);
        break;
      case 4:
        remove_course(students, students_actual);
        break;
      default:
        printf("Your choice is outside the acceptable range.  "
          "Please try again.\n");
    } // switch (choice)
  } while (choice != 0);
} // display_info()
Esempio n. 2
0
void CBot::preprocess_response()
{
	if(m_sResponse.find("*") != std::string::npos)
	{
		// extracting from input
		find_subject(); 
		// conjugating subject
		transpose(m_sSubject); 

		replace(m_sResponse, "*", m_sSubject);
	}
}
Esempio n. 3
0
void display_info(char **subjects, char **courses, int *CRNs, int count)
{
    int choice;

    do
    {
        choice = get_choice();

        if(choice == 1)
            find_CRN(subjects, courses, CRNs, count);
        else if(choice == 2)
            find_subject(subjects, courses, CRNs, count);

    } while(choice != 0);

} // display_info()
Esempio n. 4
0
// Testing mail file class
void ex_01() {
	// Check if it works...
	string test_file_name = "Test_files/my_mail.txt";
	
	Mail_file test_file(test_file_name);
	cout << "Read " << test_file.lines.size() << " lines in " << test_file.msgs.size() << " messages.\n";
	for (Mess_iter b = test_file.begin(); b != test_file.end(); b++) {
		// cout << "Message begin:\n" << *b->begin() << "... and end:\n" << *b->end() << endl;
		string from_addr;
		if (find_from_addr(&*b, from_addr))
			cout << "Message from: " << from_addr
                 << "\n\tSubject: " << find_subject(&*b) << endl;
		else
			cout << "From line not found.\n";
	}
    
}