Hello masterinex,
First it is system("pause");
and second try to avoid system anything.
The cin.get();
will work for a pause if needed.
The IDE you are using should have the ability to set a break point on most any line of the program.
What IDE are you using?
Line 22 is easy to spot, but next time include the error messages that you get. They tell a lot.
Hope that helps,
Andy
i think there is something with the boost library that is messing it up , here is another code, I am getting cin is undefined ??
#include <boost/regex.hpp>
#include <iostream>
#include <string>
int main()
{
std::string line;
//boost::regex pat("^Subject: (Re: |Aw: )*(.*)");
boost::regex pat("ab");
while (std::cin)
{
std::getline(std::cin, line);
boost::smatch matches;
if (boost::regex_match(line, matches, pat))
std::cout << matches[0] << std::endl;
system("pause");
}
cin.get();
system("pause");
}
You mean std::cin.get()
. And std::system("pause")
.
Last edited on