Vector of pointers allocation of buffer data is null

hi,

i am using a vector of pointers to allocate memory to a buffer. my program builds, but the error i receive says that the buffer is null:

in my header file:

vector *trackBuffer;

in setup():

for(int i = 0; i < 5; i ++) {
    trackBuffer[i].assign(bufferSize, 0.0);
}

in my audioout():

for(int i = 0; i < 5; i ++){
for(int j = 0; j < bufferSize; j ++){
trackBuffer[i][j] = ch[i];
}
}

the error:
this const std::__1::__vector_base<float, std::__1::allocator > * NULL 0x00000000

thanks in advance.

just incase anyone is looking for an answer to this… i didn;t set any memory for the buffers and i took a diffrent approach:

.h
float *buffers[n];

.cpp
for 0 -> n
buffer[n] = new float[var];
memset(buffer[n], 0, var * sizeof(float));