Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Boost Compilation

Reply
Thread Tools

Boost Compilation

 
 
Travis
Guest
Posts: n/a
 
      02-18-2008
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/.../is_equal.html

I know the boost libraries are installed.
 
Reply With Quote
 
 
 
 
Martin York
Guest
Posts: n/a
 
      02-18-2008
On Feb 18, 2:06 pm, Travis <(E-Mail Removed)> 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/.../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";
}
 
Reply With Quote
 
 
 
 
utab
Guest
Posts: n/a
 
      02-19-2008
On Feb 18, 11:06 pm, Travis <(E-Mail Removed)> 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/.../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,
 
Reply With Quote
 
Travis
Guest
Posts: n/a
 
      02-21-2008
On Feb 18, 2:28 pm, Martin York <(E-Mail Removed)> wrote:
> On Feb 18, 2:06 pm, Travis <(E-Mail Removed)> 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/.../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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boost::any and boost::lambda with std::find_if Misiu C++ 3 01-31-2007 05:46 PM
#include <boost/shared_ptr.hpp> or #include "boost/shared_ptr.hpp"? Colin Caughie C++ 1 08-29-2006 02:19 PM
Problems mixing boost::lambda::bind and boost::shared_ptr.. Toby Bradshaw C++ 6 06-02-2006 04:12 PM
Any Boost Experts out there for Boost.Regex? Richard Latter C++ 2 05-17-2004 03:12 PM
Boost + Python C/API: Mixing python return types with boost return types Steve Knight Python 2 10-10-2003 10:11 AM



Advertisments