I have the follwoing code. however, when I debug it gives an error saying" vector subscript out of range"

Can anyone pelase help?

//Vector based multi-dimensional arrays
//Vectors are a STL container that allow you to store pretty much anything in them. When used correctly they can be very powerful containers.
//
//They provide an added benefit that they will automatically remove the memory they use when they go out of scope.
//
//This means that objects stored within a vector do not need to be de-allocated (but pointers to objects do).
//
//You can also do some interesting things with dynamic multi-dimensional arrays with vectors.
//
//For example, if you only allocate the first dimension, then use the .push_back() to add records to the 2nd dimension it's no longer a grid,
//
//but an array with a dynamically sized 2nd dimension (much like a street of buildings each with a different amount of floors).
//
//This functionality can be achieved using pointers, but is much harder to do.




#include <iostream>
#include <vector>
#include<conio.h>


using std::vector;
using namespace std;

#define HEIGHT 5
#define WIDTH 3
#define DEPTH 7

int main() {
vector<vector<vector<double> > > array3D;

// Set up sizes. (HEIGHT x WIDTH)
array3D.resize(HEIGHT);
for (int i = 0; i < HEIGHT; ++i) {
array3D[i].resize(WIDTH);

for (int j = 0; j < WIDTH; ++j)
array3D[i][j].resize(DEPTH);


// Put some values in
array3D[1][2][1] = 6.0;
array3D[2][1][2] = 5.5;


}


// for (int i = 0; i < HEIGHT; ++i)
// {
//
// for (int j = 0; j < WIDTH; ++j)
//
// {
// for (int k = 0; k < DEPTH; ++k)
// {
//
// //cout<<"array3D "<<"["<<i<<"]"<<"["<<j<<"]"<<"["<<k<<"]"<<"= "<<array3D[i][j][k];
//
// getch();
//
//
// }
// }
//}


}