fork download
  1. #include <random>
  2. int random_int_function(int i)
  3. {
  4. std::default_random_engine generator;
  5. std::uniform_int_distribution<int> distribution(1,100);
  6.  
  7. int random_int = distribution(generator);
  8.  
  9. return i + random_int;
  10. }
  11.  
  12. int myArray[ random_int_function( 0 ) ];
  13.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:12:39: error: array bound is not an integer constant before ‘]’ token
stdout
Standard output is empty