fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int b1[5] = {1,2,3,4,5};
  8. int b2[5] = {6,7,8,9,10};
  9.  
  10. int *a[2] = {b1, b2};
  11. int (*b)[2] = {b1, b2};
  12.  
  13. return 0;
  14. }
Compilation error #stdin compilation error #stdout 0s 15232KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:11:24: error: scalar object ‘b’ requires one element in initializer
   int (*b)[2] = {b1, b2};
                        ^
stdout
Standard output is empty