KDevelop API Documentation

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 }
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:36 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003