fork download
  1. #include <iostream>
  2.  
  3. struct hospital
  4. {
  5. char emloyes[255];
  6. char department[255];
  7. char highness[100];
  8. int amount;
  9. };
  10.  
  11. int main() {
  12. hospital h = { 0 };
  13.  
  14. h.emloyes = "";//127
  15. h.department = "";//128
  16. h.highness = "";//129
  17. h.amount = "";//130
  18.  
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:14:14: error: incompatible types in assignment of ‘const char [1]’ to ‘char [255]’
  h.emloyes = "";//127
              ^~
prog.cpp:15:17: error: incompatible types in assignment of ‘const char [1]’ to ‘char [255]’
  h.department = "";//128
                 ^~
prog.cpp:16:15: error: incompatible types in assignment of ‘const char [1]’ to ‘char [100]’
  h.highness = "";//129
               ^~
prog.cpp:17:13: error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive]
  h.amount = "";//130
             ^~
stdout
Standard output is empty