fork download
  1. struct S {
  2. double arr[1];
  3. S(double arr[1]) : arr(arr) {}
  4. };
  5.  
  6. int main(void) {
  7. double arr[1] = {1.2};
  8. S p(arr);
  9. return 0;
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In constructor ‘S::S(double*)’:
prog.cpp:3:31: error: incompatible types in assignment of ‘double*’ to ‘double [1]’
     S(double arr[1]) : arr(arr) {}
                               ^
stdout
Standard output is empty