It is in the namespace std, but you need to include the appropriate header:
#include <set>
The header <iostream>contains only the standard I / O library, which includes std::coutand std::endl. std::set, however, is defined in <set>.
source
share