Boost logo

Boost Users :

From: Aaron (yilu_at_[hidden])
Date: 2005-10-11 07:38:05


Thank John! I tried this, and it's ok:

struct Grepper
{
    int nPriority;
    boost::regex re;
    
    friend bool operator< (const Grepper& g1, const Grepper& g2)
    {
        return g1.nPriority > g2.nPriority;
    }
};
bool QueryGreppers(Grepper& gp)
{
    gp.nPriority = 1;
    gp.re =
boost::regex("\\s*#define\\s+([^\\s]+)\\s+([^/\\r\\n]+)([^\\r\\n]*)");
    
    return true;
}

int main(void)
{
    Grepper gp;
    QueryGreppers(gp);

    return 0;
}

But in my real project env, this code snippet is place into a DLL:
    Grepper gp;
    QueryGreppers(gp);

And QueryGreppers is a function pointer get from another dll, any
comments about this?

Another questions:
I only used Vc6 as develop tools, I know little about lib and dll
selection issue. Where can I learn about how to select boost lib and
dlls?

"John Maddock" <john_at_[hidden]> $)ATZNDUBVPLa5=:

>int main(void)
>{
>boost::regex re;
>re ="\\s*#define\\s+([^\\s]+)\\s+([^/\\r\\n]+)([^\\r\\n]*)";
>return 0;
>}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net