0
Ich versuche zu lernen, C++, so schrieb ich eine kurze program.This ist mein C++ Code:'CBEGIN' wurde nicht in diesem Bereich erklärt
#include <iostream>
#include <string>
#include <regex>
using namespace std;
int main()
{
string line;
regex email(R"(\[email protected](\w+\.)+\w+)");
while (getline(cin, line)) {
smatch matches;
auto current = cbegin(line);
auto last = cend(line);
while (current != last)
{
if (regex_search(current, last, matches, email))
{
ssub_match match = matches[0];
current = match.second;
cout << match.str() << endl;
}
else
{
break;
}
}
}
return 0;
}
ich diesen Fehler:
=== Build file: "no target" in "no project" (compiler: unknown) ===
C:\Users\Public\Documents\CPP Scripts\usingStringType.cpp||In function 'int main()':
C:\Users\Public\Documents\CPP Scripts\usingStringType.cpp|13|error: 'cbegin' was not declared in this scope
C:\Users\Public\Documents\CPP Scripts\usingStringType.cpp|14|error: 'cend' was not declared in this scope
=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===
Welcher Compiler? Und wie nennt man den Compiler? –