Witajcie!
Przpisuje kod z Fortrana na C++ i mam problem z nastepujaca funkcja:
Kod:
void FOK(double **G)
{
double **P;
P = new double *[2]; for (int i = 0; i < 2; i++) P[i] = new double [2];
double *****TT;
TT = new double ****[2];
for (int i = 0; i < 2; i++)
{
TT[i] = new double ***[2];
for (int j = 0; j < 2; j++)
{
TT[i][j] = new double **[2];
for (int k = 0; k < 2; k++)
{
TT[i][j][k] = new double *[2];
for (int l = 0; l<2; l++) TT[i][j][k][l] = new double [2];
}
}
}
for (int i = 0; i < 2; i++)
for (int j = 0; j < 2; j++)
{
G[i][j] = 0;
for (int k = 0; k < 2; k++)
for (int l = 0; l < 2; l++)
G[i][j] = G[i][j] + P[k][l] * (TT[i][j][k][l] - (0.5 * TT[i][j][k][l]));
}
}
Wsykakuje mi blad:
invalid operands of types ‘double’ and ‘double*’ to binary ‘operator*’
Gdzie lezy moj blad w tym kodzie lub w moim rozumowaniu?