Boost Compilation

U

utab

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

Travis

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top