Large map<srting,string> Initialization

Florian Weimer fw@deneb.enyo.de
Sun May 22 16:20:00 GMT 2005


* Tom Browder:

> 1.  Is there a better way to initialize such a map?

You could use a (preferably sorted) array of {"long_string1",
"long_string_val1"} structure values to initialize the map.  Depending
on your needs, you might be able to skip the map altogether and just
use a binary search to locate the correct strings.



More information about the Gcc-help mailing list