fork download
  1. #include <iostream>
  2. using namespace std;
  3. int** DATA = new int*[10]; // This has now got 10x0
  4. int main() {
  5.  
  6. for(unsigned i=0; (i < 10); i++)
  7. {
  8. DATA[i] = new int[5];
  9.  
  10. for(unsigned j=0; (j < 5); j++)
  11. {
  12. DATA[i][j] = i*j;
  13.  
  14. std::cout << DATA[i][j] << ' ';
  15. }
  16. std::cout << std::endl;
  17. }
  18.  
  19.  
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
0 0 0 0 0 
0 1 2 3 4 
0 2 4 6 8 
0 3 6 9 12 
0 4 8 12 16 
0 5 10 15 20 
0 6 12 18 24 
0 7 14 21 28 
0 8 16 24 32 
0 9 18 27 36