예제 #1
0
파일: lab1.cpp 프로젝트: DreamDg/Lab1
/**
 * add a word to dictionary
 */
void addWord(Dict &d, const string &key, const string &value){
	word w = {key, value};
	if (!d.add(w))
		cout << "Add failed.\n";
	d.printDict();
}
예제 #2
0
파일: lab1.cpp 프로젝트: DreamDg/Lab1
void removeWord(Dict &d, const string &key){
	d.remove(key);
	d.printDict();
}
예제 #3
0
파일: lab1.cpp 프로젝트: DreamDg/Lab1
void updateWord(Dict &d, const word &w){
	d.update(w);
	d.printDict();
}
예제 #4
0
파일: lab1.cpp 프로젝트: DreamDg/Lab1
void searchWord(Dict &d, const string &description, const string &key){
	cout << description  <<  d.search(key) << endl;
	d.printDict();
}