0
で宣言されていなかった私は、C++を習得しようとしているので、私は短いprogram.thisを書いた私のC++コードされています。私はこのエラーを取得する'cbegin' がこの範囲
#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;
}
:
=== 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)) ===
どのようなコンパイラですか?コンパイラはどうやって呼びますか? –