Boost logo

Boost Users :

Subject: Re: [Boost-users] How to compile boost regex
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-09-15 11:27:58


AMDG

manish4gupta wrote:
> I am compiling the program using the following option g++ -ggdb -lboost_regex
> -o regex regex.cpp but it is giving error.
>
> <snip>
> for(j = 0; j < what.captures(i).size(); ++j)
>
> <snip>
>
> Error message:
> regex.cpp: In function ‘void print_captures(const std::string&, const
> std::string&)’:
> regex.cpp:20: error: ‘class boost::smatch’ has no member named ‘captures’
> regex.cpp:26: error: ‘class boost::smatch’ has no member named ‘captures’
>
> How can i avoid that. Please help me.
>
>

There is no function called captures. Use the subscript operator.
what[i].size()

In Christ,
Steven Watanabe


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