fork download
  1. struct NoDefault
  2. {
  3. NoDefault(float f);
  4. };
  5.  
  6. int main()
  7. {
  8. NoDefault arr[4];
  9. return 0;
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8: error: no matching function for call to ‘NoDefault::NoDefault()’
prog.cpp:3: note: candidates are: NoDefault::NoDefault(float)
prog.cpp:2: note:                 NoDefault::NoDefault(const NoDefault&)
prog.cpp:8: warning: unused variable ‘arr’
stdout
Standard output is empty