Problem ccs
User gordonlu
Submission Time 2023-11-23 19:15:07
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ccs.cpp: In function ‘std::vector<std::__cxx11::basic_string<char> > split(const string&)’:
ccs.cpp:10:28: error: ‘istream_iterator’ was not declared in this scope
10 | return vector<string> (istream_iterator<string>(iss), istream_iterator<string>());
| ^~~~~~~~~~~~~~~~
ccs.cpp:5:1: note: ‘std::istream_iterator’ is defined in header ‘<iterator>’; did you forget to ‘#include <iterator>’?
4 | #include <unordered_set>
+++ |+#include <iterator>
5 |
ccs.cpp:10:27: error: expected primary-expression before ‘(’ token
10 | return vector<string> (istream_iterator<string>(iss), istream_iterator<string>());
| ^
ccs.cpp:10:51: error: expected primary-expression before ‘>’ token
10 | return vector<string> (istream_iterator<string>(iss), istream_iterator<string>());
|