Boost logo

Boost-Commit :

From: chintanraoh_at_[hidden]
Date: 2008-08-10 08:29:30


Author: chintanraoh
Date: 2008-08-10 08:29:29 EDT (Sun, 10 Aug 2008)
New Revision: 48057
URL: http://svn.boost.org/trac/boost/changeset/48057

Log:
simple new example file
Added:
   sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/example/classroom.cpp (contents, props changed)

Added: sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/example/classroom.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2008/digital_searching/dsearch/libs/dsearch/example/classroom.cpp 2008-08-10 08:29:29 EDT (Sun, 10 Aug 2008)
@@ -0,0 +1,27 @@
+#include<boost/dsearch/patricia.hpp>
+#include<boost/dsearch/pat_key_traits.hpp>
+#include<iostream>
+#include<string>
+
+using boost::dsearch::patricia;
+using boost::dsearch::pat_string_traits;
+
+int main(int argc, char** argv)
+{
+ typedef patricia<std::string,std::string,pat_string_traits> pat_type;
+ pat_type classroom;
+ typedef pat_type::iterator iterator;
+
+ classroom [ "Anirudh Santhiar" ] = "05co06";
+ classroom [ "Anup C Shan" ] = "05co11";
+ classroom [ "Pongu Somit Gupta" ] = "05co60";
+ classroom [ "Bharath Ravi" ] = "05co48";
+ classroom [ "Bala Subramanyam" ] = "05co18";
+ classroom [ "S Devika Nair" ] = "05co54";
+ classroom [ "Mahima A S"] = "05co35";
+
+ for(iterator it=classroom.begin(); it!=classroom.end(); ++it)
+ std::cout<<(*it).first<<"-->"<<(*it).second<<std::endl;
+
+ return 0;
+}


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk