Well, I've come to the conclusion that I might be able to go with a vector,
if I can figure a way to iterate through it until I find the element I'm
Say, I got a row:
-- name -- -- help -- -- syntax --
"test" "Test command." "<test>"
I do: select * from mytable;
Now, I'd like to search through the result set until I find the vector
element that matches "test". How would I do this?
Hope I explained it well.. Kind of tired right now.
2008/8/17 Warren Young <mysqlpp@stripped>
> On Aug 17, 2008, at 4:09 AM, Alex wrote:
> From looking at the example, it seems I have to use classes/structs to
>> the data into a map. Is this correct? Or, can I just use a simple
>> or something?
> The construct is called a functor:
> Functors have several advantages over function pointers, which is why
> they're used throughout STL. This feature of MySQL++ is modeled on STL
> algorithms like find_if().
> It's true, they're rather heavy on the syntactic noise. If C++ supported
> anonymous (lambda) functions, we'd use them instead in places like this, but
> it doesn't, so we use functors.
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:
GamerzWoW - http://www.gamerzwow.net