Boost Compilation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Travis

    Boost Compilation

    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.



    I know the boost libraries are installed.
  • Martin York

    #2
    Re: Boost Compilation

    On Feb 18, 2:06 pm, Travis <travis.bow...@ gmail.comwrote:
    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.
    >

    >
    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";
    }

    Comment

    • utab

      #3
      Re: Boost Compilation

      On Feb 18, 11:06 pm, Travis <travis.bow...@ gmail.comwrote:
      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.
      >

      >
      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,

      Comment

      • Travis

        #4
        Re: Boost Compilation

        On Feb 18, 2:28 pm, Martin York <Martin.YorkAma ...@gmail.comwr ote:
        On Feb 18, 2:06 pm, Travis <travis.bow...@ gmail.comwrote:
        >
        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.
        >>
        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.

        Comment

        Working...