Beispiel #1
0
void input()
{
	failure = 0;
	freopen("input.txt","r",stdin);
	scanf("%[^\n]s",sentence);
	make_sentence(sentence);
	printf("origin : %s\n",sentence);
}
// searches for given text and patterns on the catalogue
void Executive::DoSearch(FileManager& Fm, DataStore& ds, Display& dp)
{
	std::string searchString, filePatterns;
	while (1)
	{
		std::cout << "Enter Search String: ";
		std::getline(std::cin, searchString);

		std::cout << "Enter File Patterns: ";
		std::getline(std::cin, filePatterns);

		Fm.addAllPatterns(make_sentence(filePatterns));

		Fm.PatternTextSearch(ds, searchString);
		dp.DisplaySearchFiles(ds, searchString);
	}
}