Article View: comp.lang.c++.leda
Article #48Using Regular Expression as keys in dictionary, How?
From: Lemieux Sebastien
Date: Fri, 18 Aug 1995 15:51
Date: Fri, 18 Aug 1995 15:51
28 lines
1297 bytes
1297 bytes
Hi all, I'm trying to implement a that would use a LEDA dictionary with Regular Expression as keys. I've implemented the TRegex class the contains the regex and should provide the 'compare' function. But the probleme is that I would like to call the dictionary method 'lookup' using a 'char *' argument. I've tried to define TRegex::compare as: int TRegex::compare( const TRegex& s1, const char* s2 ); or int TRegex::compare( const char* s2, const TRegex& s1 ); But LEDA still says 'no compare function defined...'. What should I do? What is the simplest way to implement this kind of dictionary? Thanks for your help, -- | Sebastien Lemieux, dept. biol. || Look behind the wave of changes | lemieuse@alize.ERE.UMontreal.CA || Feel the future taking shape | PGP public key on finger. || I can see the world to come (KJ) http://alize.ere.umontreal.ca/~lemieuse/
Technical Details
Message-ID:
<lemieuse.808761061@alize.ERE.UMontreal.CA>Path:
arc1-ca.pugleaf.net!CC.UMontreal.CA!lemieuseShow Full Headers
Complete Article Headers
Newsgroups: comp.lang.c++.leda Path: arc1-ca.pugleaf.net!CC.UMontreal.CA!lemieuse From: lemieuse@ERE.UMontreal.CA (Lemieux Sebastien) Subject: Using Regular Expression as keys in dictionary, How? Message-ID: <lemieuse.808761061@alize.ERE.UMontreal.CA> Sender: news@cc.umontreal.ca (Administration de Cnews) Organization: Universite de Montreal Date: Fri, 18 Aug 1995 15:51:01 GMT