fork download
  1. enum class BankAccountState
  2. {
  3. ZeroBalance,
  4. Active,
  5. Overdrawn,
  6. Closed,
  7. };
  8.  
  9. void f(BankAccountState state)
  10. {
  11. }
  12.  
  13. int main(int, const char **)
  14. {
  15. f(5);
  16. return 0;
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main(int, const char**)':
prog.cpp:15:5: error: cannot convert 'int' to 'BankAccountState' for argument '1' to 'void f(BankAccountState)'
  f(5);
     ^
stdout
Standard output is empty