i have this expression and i want to model it with cplex and c++ , i don't know if the code is correct or not , can someone help me, with x[w][w][i][j] is a decision variable

this is my code :
compteur = 0;
IloFloatVarArray2 CW(env, W);
for (w = 0; w < W; w++)
{
CW[w] = IloFloatVarArray(env, W, 0.0, INFINITY);
model.add(CW[w]);
#ifdef DEBUG
for (w = 0; w < W; w++)
{
sprintf(varname, "CW_%d_%d", w, w);
CW[w][w].setName(varname);
compteur++;
}
}
#endif
#ifdef DEBUG
printf("compteur cw =%d\n", compteur);
#endif
IloExpr CW[w][w](env);
for (i = 0; i < A; i++)
for (j = 0; j < A; j++)
CW[w][w] += d[i][j] * xW[w][i][j][w];
for (i = 0; i < A; i++)
for (j = 0; j < A; j++)
CW[w][w] += Parc[i][j] * xW[w][i][j][w];
for (i = 0; i < A; i++)
for (j = 0; j < A; j++)
CW[w][w] += 1 * xW[w][i][j][w];
model.add(env, CW[w][w]);
CW[w][w].end();
------------------------------
siwar mni
------------------------------
#DecisionOptimization