15 Sep
2009
15 Sep
'09
3:27 p.m.
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