fork download
  1. #include <set>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. const int alpha=301;
  8.  
  9. if(set{0,200,300,400}.count(alpha))
  10. {
  11. cout << "found" << endl;
  12. }
  13. else
  14. {
  15. cout << "not found" << endl;
  16. }
  17.  
  18. return 0;
  19. }
Compilation error #stdin compilation error #stdout 0s 3468KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:9:8: error: missing template arguments before '{' token
  if(set{0,200,300,400}.count(alpha))
        ^
prog.cpp:9:8: error: expected ')' before '{' token
stdout
Standard output is empty