|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I'm using the compare libraries for the first time (http://
http://www.boost.org/doc/html/string...ng.compare.hpp). I guess I'm not including the right thing because I can't get certain functions to work. This works.... #include <iomanip> #include <iostream> #include <string> #include <boost/algorithm/string/compare.hpp> using namespace std; using namespace boost; boost::is_equal IsEqual; int main() { // inital output string First; string Second; cout << "String 1: "; cin >> First; cout << "String 2: "; cin >> Second; string IsEqualResult = IsEqual(First,Second) ? "yes" : "no"; cout << "IsEqual = " << IsEqualResult << endl; return 0; } But changing it to use boost::is_iequal, boost::is_less, etc. doesn't seem to compile. I'm not sure what I'm missing from the documentation, I think I'm including everything necessary. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Travis wrote:
> I'm using the compare libraries for the first time (http:// > http://www.boost.org/doc/html/string...ng.compare.hpp). > I guess I'm not including the right thing because I can't get certain > functions to work. > > This works.... > > #include <iomanip> > #include <iostream> > #include <string> > > #include <boost/algorithm/string/compare.hpp> > > using namespace std; > using namespace boost; > > boost::is_equal IsEqual; > > int main() > { > // inital output > string First; > string Second; > > cout << "String 1: "; > cin >> First; > cout << "String 2: "; > cin >> Second; > > string IsEqualResult = IsEqual(First,Second) ? "yes" : "no"; > > cout << "IsEqual = " << IsEqualResult << endl; > > return 0; > } > > But changing it to use boost::is_iequal, boost::is_less, etc. doesn't > seem to compile. "Doesn't seem"? Are you unsure? What "seems" to be the problem? What messages do you get from your compiler? Why do I have to pull it out of you? BTW, do you know of the existence of Boost online forums? They are right there, on their web site... > I'm not sure what I'm missing from the documentation, > I think I'm including everything necessary. V -- Please remove capital 'A's when replying by e-mail I do not respond to top-posted replies, please don't ask |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Feb 22, 10:39 am, "Victor Bazarov" <v.Abaza...@comAcast.net> wrote:
> Travis wrote: > > I'm using the compare libraries for the first time (http:// > >http://www.boost.org/doc/html/string...r.boost.algori...). > > I guess I'm not including the right thing because I can't get certain > > functions to work. > > > This works.... > > > #include <iomanip> > > #include <iostream> > > #include <string> > > > #include <boost/algorithm/string/compare.hpp> > > > using namespace std; > > using namespace boost; > > > boost::is_equal IsEqual; > > > int main() > > { > > // inital output > > string First; > > string Second; > > > cout << "String 1: "; > > cin >> First; > > cout << "String 2: "; > > cin >> Second; > > > string IsEqualResult = IsEqual(First,Second) ? "yes" : "no"; > > > cout << "IsEqual = " << IsEqualResult << endl; > > > return 0; > > } > > > But changing it to use boost::is_iequal, boost::is_less, etc. doesn't > > seem to compile. > > "Doesn't seem"? Are you unsure? What "seems" to be the problem? > What messages do you get from your compiler? Why do I have to pull > it out of you? > > BTW, do you know of the existence of Boost online forums? They are > right there, on their web site... > > > I'm not sure what I'm missing from the documentation, > > I think I'm including everything necessary. > > V > -- > Please remove capital 'A's when replying by e-mail > I do not respond to top-posted replies, please don't ask Thanks for the info. I won't bother clarifying the "seems". I'll move the topic to a more useful forum. Thanks. |
|
![]() |
| Outils de la discussion | |
|
|