[RESOLVED] First foray into libboost
A few days ago I installed libboost. To get myself started I decided to follow the boost regex example shown here. It looked simple enough and my resultant code looks like this:-
Code:
#include <string>
#include <boost/regex.h>
using namespace std;
using namespace boost;
bool validate_card_format(const string s)
{
static const boost::regex e("(\\d{4}[- ]){3}\\d{4}");
return regex_match(s, e);
}
However, this gives me the following compiler errors:-
error C2039: 'regex' : is not a member of 'boost'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2146: syntax error : missing ';' before identifier 'e'
error C3861: 'e': identifier not found
error C3861: 'regex_match': identifier not found
I guess it isn't enough just to #include <boost/regex.h>. What have I missed out
"A problem well stated is a problem half solved.” - Charles F. Kettering