|
Boost Users : |
From: John Maddock (john_at_[hidden])
Date: 2005-03-29 04:56:05
> I'm having problems getting the same result in C++.
> This is the sample program:
> {
> for (int i=0;i<what.size();++i)
> {
> std::cout << what[i].first << " "
> << what[i].second << std::endl;
Therein lies your error: the contents of what[n].first and what[n].second
are *not* null terminated strings, they represent an *iterator range*, if
you want to get back a string then call the str() method:
std:: cout << what.str(i) << std::endl;
HTH,
John.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net