test-trie.cpp
Go to the documentation of this file.00001
00002 #include <iostream>
00003 #include "Trie.h"
00004
00005 using std::cout;
00006 using std::endl;
00007
00008 int main()
00009 {
00010 Structure::KStringIntTrie A;
00011
00012 A.insert("abd", 3);
00013 A.insert("abc", 2);
00014 A.insert("bcg", 1);
00015 A.insert("bug", 5);
00016
00017 cout << "query abd ";
00018 int* comp = A.query("abd");
00019 if (comp) cout << "val " << *comp << endl;
00020 else cout << "not found" << endl;
00021 }
This file is part of the documentation for KDevelop Version 3.1.2.