
7 Oct
2011
7 Oct
'11
8:30 a.m.
Den 06-10-2011 18:27, Phil Endecott skrev:
Thorsten Ottosen wrote:
Even better, don't use vector<const char*>. What o you need that for? [snip]
Here's a real motivating example where I want to use vector<const char*>. I have a large file containing null-terminated strings which I memory map. After opening the file, I construct some sort of index of those strings in a sorted vector. Then I search for things using std::equal_range, std::lower_bound, or similar.
That's a good example, I grant you. -Thorsten