🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.c++.leda
1 messages
1 total messages Started by Lemieux Sebastien Fri, 18 Aug 1995 15:51
Using Regular Expression as keys in dictionary, How?
#48
Author: Lemieux Sebastien
Date: Fri, 18 Aug 1995 15:51
28 lines
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/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads