fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int *arr= {1, 22, 5, 20}; //NOT WORKING IN C++
  7. cout<<arr.size();
  8. return 0;
  9. }
Compilation error #stdin compilation error #stdout 0s 3460KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:6:25: error: scalar object 'arr' requires one element in initializer
  int *arr= {1, 22, 5, 20};   //NOT WORKING IN C++
                         ^
stdout
Standard output is empty