Иванов@avanov1
35 лет3 года в сервисе14.04.2022
Усовершенствовать программу для работы с регулярными выражениями (гугл. Regex или регулярные выражения).
Реализовать:
#include
#include
using namespace std;
class IP
{
public:
IP()
{
}
bool w;
string str;
void input()
{
getline (cin,str);
}
void operation()
{
regex reg("^[0-9]{0,3}\\.[0-9]{0,3}\\.[0-9]{0,3}\\.[0-9]{0,3}$");
w = regex_match(str, reg);
}
void output()
{
cout
cout
}
};
int main()
{
IP ip;
ip.input();
ip.operation();
ip.output();
}