Boost Compilation

Discussion in 'C++' started by Travis, Feb 18, 2008.

  1. Travis

    Travis Guest

    Travis, Feb 18, 2008
    #1
    1. Advertising

  2. Travis

    Martin York Guest

    On Feb 18, 2:06 pm, Travis <> wrote:
    > I'm trying to figure out how to use Boost? For example, I'd like to
    > use the is_equal function to test two strings but I can't figure out
    > exactly what to include or how to call the method.
    >
    > http://www.boost.org/doc/html/boost/algorithm/is_equal.html
    >
    > I know the boost libraries are installed.


    boost::is_equal test;

    std::string s1("Plop");
    std::string s2("Plop");

    if (test(s1,s2))
    {
    std::cout << "Equal\n";
    }
    Martin York, Feb 18, 2008
    #2
    1. Advertising

  3. Travis

    utab Guest

    On Feb 18, 11:06 pm, Travis <> wrote:
    > I'm trying to figure out how to use Boost? For example, I'd like to
    > use the is_equal function to test two strings but I can't figure out
    > exactly what to include or how to call the method.
    >
    > http://www.boost.org/doc/html/boost/algorithm/is_equal.html
    >
    > I know the boost libraries are installed.


    Could you please give a small program and possible errors that you got
    during the compile phase.

    1st guess on your input is : did you set -I and -l options when
    compiling the program?

    If you send the above mentioned, anyone familiar with boost will
    direct you to the right location,

    Rgds,
    utab, Feb 19, 2008
    #3
  4. Travis

    Travis Guest

    On Feb 18, 2:28 pm, Martin York <> wrote:
    > On Feb 18, 2:06 pm, Travis <> wrote:
    >
    > > I'm trying to figure out how to use Boost? For example, I'd like to
    > > use the is_equal function to test two strings but I can't figure out
    > > exactly what to include or how to call the method.

    >
    > >http://www.boost.org/doc/html/boost/algorithm/is_equal.html

    >
    > > I know the boost libraries are installed.

    >
    > boost::is_equal test;
    >
    > std::string s1("Plop");
    > std::string s2("Plop");
    >
    > if (test(s1,s2))
    > {
    > std::cout << "Equal\n";
    >
    > }


    This worked! Thanks so much. Can you explain what doing
    boost::is_equal test; does? I was trying to call
    boost::is_equal(s1,s2) directly.
    Travis, Feb 21, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Richard Latter
    Replies:
    2
    Views:
    2,902
    Julie
    May 17, 2004
  2. Steve Knight
    Replies:
    2
    Views:
    757
    Steve Knight
    Oct 10, 2003
  3. Toby Bradshaw
    Replies:
    6
    Views:
    1,749
    Kai-Uwe Bux
    Jun 2, 2006
  4. Colin Caughie
    Replies:
    1
    Views:
    714
    Shooting
    Aug 29, 2006
  5. Misiu
    Replies:
    3
    Views:
    2,374
    Misiu
    Jan 31, 2007
Loading...

Share This Page