Advertisement
Guest User

Untitled

a guest
Sep 10th, 2020
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1.     unsigned char*** out = new unsigned char**[255];
  2.     out[0] = new unsigned char*[255*255];
  3.     out[0][0] = new unsigned char[255 * 255 * 255];
  4.  
  5.     for (int i = 1; i < 255; i++) {
  6.         out[i] = out[i - 1] + 255;
  7.         //out[i][0] = out[i - 1][0] + 255 * 255;
  8.         for (int j = 1; j < 255; j++) {
  9.             out[i][j] = out[i][j - 1] + 255;
  10.         }
  11.     }
  12.     char c = 1;
  13.  
  14.     for (int r = 0; r < 255; r++) {
  15.         for (int g = 0; g < 255; g++) {
  16.             for (int b = 0; b < 255; b++) {
  17.                 cout << r << " | " << g << " | " << b << endl;
  18.                 out[r][g][b] = c++;
  19.             }
  20.         }
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement