# Setting an array in the HLSL shader

I have a array of six float4x4's in my shader.

cbuffer pseudeocb
{
float4x4 Mypseudo[6];
};


I need to set these in my code.

ID3DX11EffectMatrixVariable* Pseudo;
void SetPseudo(CXMMATRIX M) { Pseudo->SetMatrix(reinterpret_cast<const float*>(&M)); }
Pseudeo = mFX->GetVariableByName("Mypseudo")->AsMatrix();


This will set one. How do I set six of them? Do I need a SetPseudo function?

Can I do something like the following:

XMMATRIX *p = new XMMATRIX[6];

or

XMMATRIX p[6];