#include <iostream>#include <unordered_set> int main() { std::unordered_set<int> us {1,2,3,4,5}; std::cout <<*(us.begin() + 3); return 0;}
Standard input is empty
prog.cpp: In function ‘int main()’: prog.cpp:6:27: error: no match for ‘operator+’ (operand types are ‘std::unordered_set<int>::iterator {aka std::__detail::_Node_iterator<int, true, false>}’ and ‘int’) std::cout <<*(us.begin() + 3); ~~~~~~~~~~~^~~
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!