В приведенном ниже коде много выходных строк, в конце я пытаюсь вставить обратно в avector и добавить его в строку, чтобы потом я мог ее вернуть, но он получает только последнюю строку, которая мне нужна, чтобы получитьвсе они.
Что я делаю неправильно, чтобы я мог отбросить все строки
DCS_LOG_DEBUG("--------------- Validating .X/ ---------------")
std::string str = el[i].substr(3);
std::vector<std::string>st;
split(st,str,boost::is_any_of("/"));
boost::regex const string_matcher(splitMask[0]);
if(boost::regex_match(st[0],string_matcher))
{
a = "Correct Security Instruction\n";
}
else
{
a = "Incorrect Security Instruction\n"
}
boost::regex const string_matcher4(splitMask[4]);
if(boost::regex_match(st[4],string_matcher4))
{
a = "Correct Autograpgh\n"
}
else
{
a = "Incorrect Autograpgh\n"
}
boost::regex const string_matcher5(splitMask[5]);
if(boost::regex_match(st[5],string_matcher5))
{
a = "Correct Free text\n";
}
else
{
a = "Incorrect Free text\n"
}
std::vector<std::string>::iterator it;
std::string s = ("");
output.push_back(a);
i++;
for(it = output.begin(); it < output.end(); it++)
{
s+= *it;
}
return s;