Advertisement
CubeGod

Conclusion

Mar 5th, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.95 KB | None | 0 0
  1. #include <cstdio>
  2. using namespace std;
  3.  
  4. const int CHUNKSIZE = 64;
  5. int*** b_ints;
  6.  
  7. int main(int argc, char** argv)
  8. {
  9.     b_ints = new int**[CHUNKSIZE];
  10.     for(int i = 0; i < CHUNKSIZE; i++)
  11.     {
  12.         b_ints[i] = new int*[CHUNKSIZE];
  13.         for(int j = 0; j < CHUNKSIZE; j++)
  14.         {
  15.             b_ints[i][j] = new int[CHUNKSIZE];
  16.            
  17.             for (int x = 0; x < CHUNKSIZE; x++)
  18.             {
  19.                 for (int y = 0; y < CHUNKSIZE; y++)
  20.                 {
  21.                     for (int z = 0; z < CHUNKSIZE; z++)
  22.                     {
  23.                         if(b_ints[x][y][z])
  24.                         {
  25.                             printf("\nfail\n");
  26.                         }
  27.                         else
  28.                         {
  29.                             printf("test %d %d %d \n",x,y,z);
  30.                         }
  31.                     }
  32.                 }
  33.             }
  34.         }
  35.     }
  36. }
  37.  
  38. Output:
  39. test 0 0 0
  40. test 0 0 1
  41. test 0 0 2
  42. test 0 0 3
  43. test 0 0 4
  44. test 0 0 5
  45. test 0 0 6
  46. test 0 0 7
  47. test 0 0 8
  48. test 0 0 9
  49. test 0 0 10
  50. test 0 0 11
  51. test 0 0 12
  52. test 0 0 13
  53. test 0 0 14
  54. test 0 0 15
  55. test 0 0 16
  56. test 0 0 17
  57. test 0 0 18
  58. test 0 0 19
  59. test 0 0 20
  60. test 0 0 21
  61. test 0 0 22
  62. test 0 0 23
  63. test 0 0 24
  64. test 0 0 25
  65. test 0 0 26
  66. test 0 0 27
  67. test 0 0 28
  68. test 0 0 29
  69. test 0 0 30
  70. test 0 0 31
  71. test 0 0 32
  72. test 0 0 33
  73. test 0 0 34
  74. test 0 0 35
  75. test 0 0 36
  76. test 0 0 37
  77. test 0 0 38
  78. test 0 0 39
  79. test 0 0 40
  80. test 0 0 41
  81. test 0 0 42
  82. test 0 0 43
  83. test 0 0 44
  84. test 0 0 45
  85. test 0 0 46
  86. test 0 0 47
  87. test 0 0 48
  88. test 0 0 49
  89. test 0 0 50
  90. test 0 0 51
  91. test 0 0 52
  92. test 0 0 53
  93. test 0 0 54
  94. test 0 0 55
  95. test 0 0 56
  96. test 0 0 57
  97. test 0 0 58
  98. test 0 0 59
  99. test 0 0 60
  100. test 0 0 61
  101. test 0 0 62
  102. test 0 0 63
  103.  
  104. RUN FINISHED; Segmentation fault; core dumped; real time: 20ms; user: 0ms; system: 0ms
  105.  
  106.  
  107. I hereby conclude that my build environment is insane.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement