fork download
  1. typedef enum {
  2. RED = 1,
  3. GREEN,
  4. BLUE,
  5. GLUE
  6. } Color;
  7.  
  8. typedef struct {
  9. Color color;
  10. int a;
  11. double d;
  12. } MStruct;
  13.  
  14. int main()
  15. {
  16. MStruct mstruct = {0};
  17. mstruct.a = 10;
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:16: error: invalid conversion from ‘int’ to ‘Color’
stdout
Standard output is empty